Skip to content

chunlaw/yii2-azure-authclient

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

Latest Stable Version Total Downloads Build Status

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.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published