1. 程式人生 > >各自平臺token獲取解析及使用者資訊的獲取

各自平臺token獲取解析及使用者資訊的獲取

1、auth根據手機號碼獲取auth平臺session_token記統一認證的user_id與pass_id

[[email protected]12.55 logs]$ cd /home/d139/logs
[[email protected]-QHD-CNG152TFKX-12.55 logs]$ cat mcloud_cas_access.20181110.log | grep --color 'login' | head -n1
2018-11-10 00:00:00 1541779200.7757  112.20.12.196      0.049542903900146       auth.call.139
.com/login.xml?appid=f206422f2ac3c3e11dd6db37854d0bc2&service=http://api.cytxl.com.cn&gateway=1&credential=mKMFgpTQ%7C1%7CRCS%7C1544371199821%7CN0k1lKmZovhK39pn0YQbhd1sD3jD.8dvQ7UcrVr8f8AwjF2PNqQaCWeKPK1s7sOHiMkGIdZJe.zxFDxCadMBZapCiDeSwjo5jVnwYlBUefAfXmkrlNPIm0mvrOn22b4rO1OHn_MWIdEdxV7eBhy1wCVhD3vAiHQs9CIz0MmSnks-&type=cytoken&once=1&channel=10212326 {"appid":"f206422f2ac3c3e11dd6db37854d0bc2","service":"http:\/\/api.cytxl.com.cn","gateway":"1","credential":"mKMFgpTQ|1|RCS|1544371199821|N0k1lKmZovhK39pn0YQbhd1sD3jD.8dvQ7UcrVr8f8AwjF2PNqQaCWeKPK1s7sOHiMkGIdZJe.zxFDxCadMBZapCiDeSwjo5jVnwYlBUefAfXmkrlNPIm0mvrOn22b4rO1OHn_MWIdEdxV7eBhy1wCVhD3vAiHQs9CIz0MmSnks-","type":"cytoken","once":"1","channel":"10212326"} {"error_code":"0","msg":"OK","data":{"st":"STf0e300d4d175235fedddbb92bdde8085","user_id":"1980596324","pass_id":"398963358","expires":"86400"}}

 

2、auth根據auth平臺提供的session_token解析出mobile及統一認證平臺user_id與passId

2018-11-10 00:00:00 1541779200.0454  192.168.60.249     0.020688056945801       auth.cytxl.com.cn/validate.json {"appid":"4186d8e89861735346686ffcdc9a0427","st":"ST747fef10b13137375e7f2388a88030e6","once":"10f6288df04a8a0662d899a3fcc2a246"}       {"
error_code":"0","msg":"OK","data":{"user_id":"1972293136","pass_id":"1764358031","mobile":"13530813506","email":"","expires":"69927"}}

特別說明:auth平臺 auth.cytxl.com.cn/validate.json介面如果請求統一認證註冊、登入介面失敗,那麼介面返回mobile也是空,錯誤原因要根據auth平臺session_token解析的mobile查詢ccup平臺日誌。

 

3、auth平臺介面auth.call.139.com/login.[xml|json]或auth.call.139.com/registerAndLogin.[xml|json]介面在入參type=cytoken時,把引數credential解碼成手機號碼再請求/ccup/user/register或/ccup/user/sso/login介面獲取統一認證平臺userId及passId

 

4、ccup根據手機號碼獲取統一認證passId與userId與統一認證平臺token 

2018-11-10 00:00:00 1541779200.7757  0.0381, http://192.168.1.63:8880/ccup/user/sso/login.action, {"clientId":"100013","loginId":"13691068800","expireTime":"86400000","clientVersion":"","originalClientId":"560001","ip":"112.20.12.196","requestId":"1541779200"}, {"result":"1","error":null,"passId":"398963358","requestId":"1541779200","token":"PedyEzZ8tgtmf_g8cErssUT8l8BbXEqLo02HjjDGB4_qoXAYSzTACeD12AOCjM1vrnXgU_0FPbUBuSGO10G5dAiSBfG-ZydvkisHYfc95uDrjMVVGBE1SpXPhoVsYVjOWKHsHDdawgQxURbMzkRKo3LbClvUaA4q3PBsxmk6xAs|jobmywhw|h5aee9rt","userId":"1980596324"}, http://auth.call.139.com/login.xml?appid=f206422f2ac3c3e11dd6db37854d0bc2&service=http://api.cytxl.com.cn&gateway=1&credential=mKMFgpTQ%7C1%7CRCS%7C1544371199821%7CN0k1lKmZovhK39pn0YQbhd1sD3jD.8dvQ7UcrVr8f8AwjF2PNqQaCWeKPK1s7sOHiMkGIdZJe.zxFDxCadMBZapCiDeSwjo5jVnwYlBUefAfXmkrlNPIm0mvrOn22b4rO1OHn_MWIdEdxV7eBhy1wCVhD3vAiHQs9CIz0MmSnks-&type=cytoken&once=1&channel=10212326