oauth2文档
B端系统使用passwod授权方式
获取token,向https://域名/oauth/token发起post请求,请求参数
grant_type:password client_id:2 "根据具体客户端变更 client_secret:qhlTUEmRtg6AMZmPq0tMcPMwyBrSv3z5ZSeBDw57 "根据具体客户端变更 username: xxxxxx "账号 password: xxxxxx "密码 scope: "暂时传空返回数据格式:
{ "access_token": "33ztDIlyQy-0keEZZSfdFA", "expires_in": 86400, "refresh_token": "ON6QaG6VTCiAD-Pt3Z-wrg", "token_type": "Bearer" }
erp后台的请求接口地址及客户端参数: https://eauth.mylabclub.com/oauth/token client_id: 2 client_secret: qhlTUEmRtg6AMZmPq0tMcPMwyBrSv3z5ZSeBDw57
店主端登录请求接口地址及客户端参数: https://eauth.mylabclub.com/oauth/token client_id: 1 client_secret: 47fdab4d1568ae4946045dbf6fa3cd4a21b1e740
C端平台使用passwod授权方式
grant_type:password
client_id:2 "根据具体客户端变更
client_secret:qhlTUEmRtg6AMZmPq0tMcPMwyBrSv3z5ZSeBDw57 "根据具体客户端变更
username: xxxxxx "账号
usepasswd: "1" "密码登录传1, 验证码登录传空
password: xxxxxx "用户密码(验证码登录传随机字符串)
scope: "暂时传空
ts: "时间戳
sign: "签名,md5(ts + 盐值)返回数据格式:
{
"access_token": "33ztDIlyQy-0keEZZSfdFA",
"expires_in": 86400,
"refresh_token": "ON6QaG6VTCiAD-Pt3Z-wrg",
"token_type": "Bearer"
}用户h5端的请求接口地址及客户端参数: https://cauth.mylabclub.com/oauth/token client_id: 2 client_secret: a0a8f925e58ef380c0641f09958b265691db9f68
其它
获得access_token做为请求具体资源的token,在发起资源请求的头部添加如下参数
Accept: application/json
Authorization: Bearer <token> "此处是Bearer+英文空格+token用户h5端的请求校验接口地址: https://cauth.mylabclub.com/oauth/info
erp后台的请求校验接口地址: https://eauth.mylabclub.com/oauth/info
Last updated
Was this helpful?