4.2 获取token(根据用户名密码获取token)
4.2.1 请求方式
POST
4.2.2 编码方式
application/x-www-form-urlencoded
4.2.3 接口URL(提供http以及https,根据实际情况选其一)
http连接:http://10.150.11.22:8281/token
https连接:https://10.150.11.22:8244/token
4.2.4 接口参数
参数名称 | 参数类型 | 是否可为空 | 说明 |
---|---|---|---|
username | String | N | 用户名 |
password | String | N | 密码 |
grant_type | String | N | grant_type(固定值为password) |
4.2.5 截图
4.2.6 返回结果说明
access_token:供功能接口验证授权(功能接口需要在header加入该token)
expires_in:距离token下次刷新时间(秒)
示例:
{
"access_token": "15238484-9272-3e8a-a11d-79a41c4d7b46",
"scope": "app",
"token_type": "bearer",
"expires_in": 1200
}