密码认证
密码认证主要用于手机APP,或者客服端认证
1.1.1 请求方式
POST
1.1.2 接口URL
类型 | 地址 |
---|---|
测试服(外网) | http://sso.cqcet.edu.cn/test/oauth/token |
正式服(外网) | https://sso.cqcet.edu.cn/oauth/token |
1.1.3 接口参数
参数名称 | 参数类型 | 是否可为空 | 说明 |
---|---|---|---|
username | String | N | 学生code/OA号 |
password | String | N | 密码 |
grant_type | String | N | 令牌请求的方式(密码认证需要填写password) |
client_id | String | N | 系统id |
client_secret | String | N | 系统密码 |
1.1.4 返回结果说明
access_token:令牌
成功示例:
{
"access_token": "cd2ef499-f02d-4671-8470-f56dadc4b0bf",
"token_type": "bearer",
"expires_in": 42014,
"scope": "app"
}
失败示例:
{
"error": "invalid_client",
"error_description": "Bad client credentials"
}