roaresearch/yii2-cognito
Composer 安装命令:
composer require roaresearch/yii2-cognito
包简介
README 文档
README
This Yii2 extension provides a Cognito Authenticator.
Requirements
- PHP 8.2 or higher
- Yii2 ~2.0.48
- teamgantt/juhwit
Installation
To install the package, you need to install composer and then run the following command:
Usage
Add Authenticator to the authMethods section of your authenticator component:
'authenticator' => [ 'class' => \yii\filters\CompositeAuth::class, 'oauth2Module' => $this->getOauth2Module(), 'authMethods' => [ [ 'class' => \roaresearch\yii2\cognito\Authenticator::class, 'userModelClass' => 'common\models\User', 'userPoolId' => '<userPoolId>', 'region' => '<region>', 'clientIds' => ['clientIds'], ], [ 'class' => \yii\filters\auth\HttpBearerAuth::class, ], [ 'class' => \yii\filters\auth\QueryParamAuth::class, // !Important, GET request parameter to get the token. 'tokenParam' => 'accessToken', ], ], ]
Versioning
We use SemVer for versioning. For the versions available, see the tags on this repository.
Considering SemVer for versioning rules 9, 10 and 11 talk about pre-releases, they will not be used within the ROAResearch.
Authors
- Angel Guevara - Initial work
- Carlos Llamosas - Initial work
See also the list of contributors who participated in this project.
License
This project is licensed under the MIT License - see the LICENSE.md file for details
统计信息
- 总下载量: 7
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-06-18