2amigos / yii2-usuario

Highly customizable and extensible user management, authentication, and authorization Yii2 extension
https://github.com/2amigos/yii2-usuario
Other
292 stars 140 forks source link

Added Keycloak as a new Auth Client #537

Closed eluhr closed 5 months ago

eluhr commented 5 months ago
Q A
Is bugfix? no
New feature? yes
Breaks BC? no
Tests pass? yes
Fixed issues -

With this pull request I have added a new Auth Client for Keycloak. Here is an example of how it can be configured:

// ... 
'components' => [
    // ...
    'authClientCollection' => [
        'class' => 'yii\authclient\Collection',
        'clients' => [
            'facebook' => [
                'class' => 'Da\User\AuthClient\Keycloak',
                'clientId' => 'keycloak_client_id',
                'clientSecret' => 'keycloak_client_secret',
                'issuerUrl' => 'http://keycloak/realms/your-realm'
            ]
        ]
    ]
]
maxxer commented 5 months ago

If you don't mind, I'd add the configuration example in the class comments itself, to avoid having it lost in this PR

eluhr commented 5 months ago

I've just added it