macfly/yii2-authclient-adfs

该包已被 废弃,不再维护。未建议替代包。

yii2-authclient 的 Adfs Oauth2 客户端

0.0.2 2017-03-01 14:28 UTC

This package is auto-updated.

Last update: 2023-04-13 03:41:12 UTC


README

yii2-authclient 的 Adfs 客户端

安装

通过控制台使用 Composer

composer require macfly/yii2-authclient-adfs

或添加到 composer.json 中的 "require" 部分

"macfly/yii2-authclient-adfs": "*"

使用方法

在 Active Directory 上设置 ADFS 的 Oauth2 单点登录。并将 AdfsOauth2 客户端添加到您的认证客户端中。

php
'components' => [
    'authClientCollection' => [
      'class'   => \yii\authclient\Collection::className(),
      'clients' => [
        'adfs' => [
          'class'             => 'macfly\authclient\AdfsOAuth2',
          'authUrl'           => 'https://adfs.microsoft.com/adfs/oauth2/authorize',
          'tokenUrl'          => 'https://adfs.microsoft.com/adfs/oauth2/token',
          'clientId'          => 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx',
          'clientSecret'      => 'yyyyyyyyy',
          'userAttributes'    => [
            'email',
          ],
        ],
        // other clients
      ],
    ],
    // ...
 ]