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.
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.
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.