|
|
## 1.Source 认证插件 authentication
|
|
|
1. 从数据源获取的数据,然后对其解析,提取想要的数据字段
|
|
|
|
|
|
## 2.支持插件
|
|
|
Plugins | 说明
|
|
|
---|---
|
|
|
oauth2_client | 支持标准版的oauth2认证, code、password、 client_credentials
|
|
|
basic | 支持basic认证
|
|
|
|
|
|
|
|
|
|
|
|
## 3. oauth2_client 配置结构
|
|
|
|
|
|
|
|
|
|
|
|
```
|
|
|
{
|
|
|
"authentication":{
|
|
|
"plugin":"oauth2_client",
|
|
|
"oauth2":{
|
|
|
"grant_type":"client_credentials",
|
|
|
"urlAccessToken":"http:\/\/sandbox.qtgl.com.cn\/infoplus\/oauth2\/token",
|
|
|
"clientId":"demo",
|
|
|
"clientSecret":"demosecret",
|
|
|
"scopes":"sys_profile",
|
|
|
"timeout":"15"
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
```
|
|
|
{
|
|
|
"authentication":{
|
|
|
"plugin":"oauth2_client",
|
|
|
"oauth2":{
|
|
|
"grant_type":"client_credentials",
|
|
|
"urlAccessToken":"http:\/\/sandbox.qtgl.com.cn\/infoplus\/oauth2\/token",
|
|
|
"redirectUri": "[site:url]/sso/callback",
|
|
|
"urlAuthorize": "https://work.ketanyun.com/sso/oauth2/",
|
|
|
"clientId":"demo",
|
|
|
"clientSecret":"demosecret",
|
|
|
"scopes":"sys_profile",
|
|
|
"timeout":"15"
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
```
|
|
|
### 3.1.字段说明
|
|
|
变量 | 值
|
|
|
---|---
|
|
|
grant_type | 授权类型支持: authorization_code、client_credentials、password
|
|
|
urlAccessToken | token先接
|
|
|
redirectUri | redirectUri
|
|
|
urlAuthorize | urlAuthorize
|
|
|
clientId | 认证id
|
|
|
clientSecret| 密钥
|
|
|
timeout| 请求超时设置 |
|
|
\ No newline at end of file |