worteks/yii2auth-oidc
最新稳定版本:0.2
Composer 安装命令:
composer require worteks/yii2auth-oidc
包简介
OIDC connector for yii2-authclient
README 文档
README
This extension adds OIDC support for yii2-authclient.
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require worteks/yii2auth-oidc
or add
"worteks/yii2auth-oidc": "~0.2"
to the require section of your composer.json.
Usage
You must read the yii2-authclient docs
Set up an OpenID Provider (OP) and configure your Yii2 app as a Relying Party (RP) on your Authentication Server.
Example application configuration:
'components' => [ 'authClientCollection' => [ 'clients' => [ // ... 'oidc' => [ 'class' => 'worteks\yii\authclient\OIDC', 'domain' => 'https://auth.example.com', 'clientId' => 'myClientId', 'clientSecret' => 'myClientSecret', ], ], // ... ]
| Configuration | Mandatory | Default to | Description |
|---|---|---|---|
| domain | yes | URL of your authentication server | |
| clientId | yes | Your client id | |
| clientSecret | yes | Your client secret | |
| authUrl | no | '/oauth2/authorize' | Authorization Endpoint |
| tokenUrl | no | '/oauth2/token' | Token Endpoint |
| apiBaseUrl | no | '/oauth2' | Base for Userinfo Endpoint |
| userInfoUrl | no | 'userinfo' | Userinfo Endpoint |
| scope | yes | 'openid profile email' | What access privileges are being requested |
| defaultName | no | Yii auth client id | Auth service name to use in DB record, CSS |
| defaultTitle | no | Yii auth client id | Auth service title to display in views |
统计信息
- 总下载量: 15.38k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 4
- 点击次数: 1
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2019-09-20