chunlaw / yii2-azure-authclient
External authentication via OAuth and OpenID for the Yii framework, support Azure account
Installs: 7 695
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 4
Forks: 2
Open Issues: 0
Type:yii2-extension
Requires
- yiisoft/yii2: ~2.0.13
- yiisoft/yii2-authclient: ^2.2
README
Azure AuthClient Extension for Yii 2
This extension adds Azure OAuth2 client for the extensions Yii 2 AuthClient. This extension is able to handle both work/organization and personal accounts resided in Azure, while solely Yii 2 AuthClient is only able to handle personal accounts.
For license information check the LICENSE-file.
Documentation is at docs/guide/README.md.
Installation
The preferred way to install this extension is through composer.
Either run
composer require --prefer-dist chunlaw/yii2-azure-authclient
or add
"chunlaw/yii2-azure-authclient": "~2.2.0"
to the require
section of your composer.json.
Configuring application
After extension is installed, you need to setup auth client collection application component:
return [
'components' => [
'authClientCollection' => [
'class' => 'yii\authclient\Collection',
'clients' => array_filter([
'azure' => [
'class' => 'chunlaw\authclient\Azure',
'returnUrl' => '<azure_return_url>',
'clientId' => '<azure_client_id>',
'clientSecret' => '<azure_client_secret>'
],
'google' => [
'class' => 'yii\authclient\clients\Google',
'returnUrl' => '<google_return_url>',
'clientId' => '<google_client_id>',
'clientSecret' => '<google_client_secret>',
],
// etc.
]),
],
],
// ...
];
Other usage remains the same as AuthClient Extension for Yii 2.