shotbow / yii2-oauth2-client
为 Shotbow 网络提供的 Yii2 认证客户端
v1.0.1
2016-04-22 14:32 UTC
Requires
- php: >=5.4
- yiisoft/yii2-authclient: ~2.0
This package is auto-updated.
Last update: 2024-09-12 02:59:30 UTC
README
该项目为 Yii2 的 AuthClient 系统创建了一个 OAuth 2 客户端。它将与 Shotbow 的 OAuth2 要求保持同步。
需求
- PHP 5.4 或更高版本
- Yii 2
- Composer
如何使用
composer require shotbow/yii2-oauth2-client
- 将以下内容添加到您的 Yii2
components
配置中
'authClientCollection' => [
'class' => yii\authclient\Collection::class,
'clients' => [
'shotbow' => [
'class' => Shotbow\Auth\Client::class,
'clientId' => 'SHOTBOW CLIENT ID',
'clientSecret' => 'SHOTBOW CLIENT SECRET',
'scope' => 'SHOTBOW REQUESTED SCOPES',
],
],
],
- 在您希望添加此功能的控制器中,按照 Yii2 指南中的说明添加 AuthAction
这就完成了!其余部分由您,开发者来决定!