Back to overview

JWT SSO

Add it on-the-fly to your HumHub by activating it in the Modules menu! ("Administration -> Modules")

No screenshots available.

JWT SSO

This module provides a single sign on mechanism to automatically log in your users by JSON Web Tokens (JWT Token).

More information about JWT can be found here:

Installation

1. Install JWT endpoint

You can find some example scripts at: humhub-path/protected/modules/jwt-sso//examples.

2. HumHub Configuration

Add following configuration to /protected/config/common.php

return [
    // ...
    'components' => [
        // ...
        'authClientCollection' => [
            'clients' => [
                // ...
                'jwt' => [
                    'class' => 'humhub\modules\sso\jwt\authclient\JWT',
    				'url' => 'Enter your JWT endpoint url here',
                    'sharedKey' => 'Enter your shared key here',
					// Other configuration options
                ],
            ],
        ],
        // ...
    ],
    // ...
];

Advanced Configuration Options

Example with all possible configuration options:

'jwt' => [
    'class' => 'humhub\modules\sso\jwt\authclient\JWT',
    'url' => 'http://ntlm.example.com/jwtclient/index.php',
    'sharedKey' => 'XKqSoxWRcLVDtveMbhQ3oxgvogWT2ef3KpKLOF_gZgwTJyznr6UDi2SCWgSeaEUo5T1_bBYbR_blojv94Sr523zDQ_CzTETN4gMYyx6xU4hsF6HGnCdoFwmd9rOTY5MiIdGX1wdwP3FvpyS0bbmG17xfTtU87gySiQaJjQWq9J2SdLOu73xPej5l1k5BA2ab-taXogZi-STi1q30w0T0kU3SGJ-fYSZO5lGNI3pws313oh83Wby8IJxhS9GZjLjOHpMO7rveoUHE6cGOXm8SjuxsJTfChPl3sGhiA2Wc-cJ-uKaN37T7qQxKeZNjXFtNGTbXwOhXbtELP_ZUy66zPg',
    // Other configuration options
    // Title of JWT Button (if autologin is disabled)
    'title' => 'Company SSO Login',
    // Automatic login, when allowed IP matches
    'autoLogin' => true,
    // Limit allowed JWT IPs
    'allowedIPs' => ['192.168.69.1', '192.168.1.*'],
    // Leeway (seconds) for token validation
    'leeway' => 660,
],

Example Shared Key Generator: https://mkjwk.org/

1.0.0 (November 6, 2019)

  • Enh: Initial commit of standalone version
Version:
1.0.0 (released 10 days ago)

Publisher:
HumHub GmbH & Co. KG

Website:
https://github.com/humhub/humhub-modules-jwt-sso

Compatibility:
HumHub 1.4 - Latest