Commit 719b8562 by 宋毅

tj

parent 6c9c0c42
......@@ -49,6 +49,9 @@ class ChannelAccessAuthAPI extends WEBBase {
opResult.data.userpin = tmpOpResult.data.userpin;
}
break;
case "getDingJsApiAuthInfo"://获取钉钉鉴权信息
opResult = await this.utilsChannelAuthSve.getDingJsApiAuthInfo(pobj, pobj.actionBody);
break;
default:
opResult = system.getResult(null, "action_type参数错误");
break;
......
......@@ -10,7 +10,7 @@ class UtilsChannelAuthService extends AppServiceBase {
}
//---------------登录-----------------------------------------------------
async getH5AliDingUserByCode(pobj, actionBody) { //获取token
async getH5AliDingUserByCode(pobj, actionBody) { //渠道通过账户进行登录,有则返回用户信息,没有则创建用户
if (!actionBody.code) {
return system.getResult(null, "actionBody.code can not be empty");
}
......@@ -18,5 +18,10 @@ class UtilsChannelAuthService extends AppServiceBase {
return result;
}
async getDingJsApiAuthInfo(pobj, actionBody) { //获取token
var result = await this.restPostUrl(pobj, this.centerAppUrl + "auth/channelAccessAuth/getDingJsApiAuthInfo");
return result;
}
}
module.exports = UtilsChannelAuthService;
1.获取请求token
1.获取请求token
......@@ -69,4 +69,28 @@ HTTP请求方式 POST
"sign": "CVvZuC0w2ZjcClTUfXtSNj8FtFs5spThQxv+oQ5tvjqFA5qoK7vihf2TkKuDX/6DvdZn1N47VIp1jsr33wMO77fS8E8ouaDJghnnUeyIST6QawYfYc3j0qIuWfXakkrcvzMhQAujbuogd/D7ntLJd1RyC3g03SaOYCPIfFfqc6U="
},
"requestId": "8691ec2bf95d4eef94cff70959c4f062"
}
\ No newline at end of file
}
4.获取钉钉鉴权信息---->供前端调用
地址:[/web/auth/channelAccessAuth/springBoard]
请求方式:POST
请求头中需要有token(token值从接口1中获取)
{
"actionType": "getDingJsApiAuthInfo",
"actionBody": {
"nowPageUrl":"http://alitm.qifu.gongsibao.com"// Y 当前网页的URL,不包含#及其后面部分
}
}
返回结果
{
"status": 0,//0成功,否则失败
"msg": "success",
"data": {
"agentId": "639185135",
"corpId": "ding1d097f874960e207",
"timeStamp": "1585319973691",
"nonceStr": "SY202003272239rOpDt2",
"signature": "f413e164fd1fe1cf057bf9ff0bbc23747ee7b732"
},
"requestId": "17e6cf486d1e40c49e3e7def2eb16e28"
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment