引入对应的加密文件,路径需根据实际项目来定
import encryption from '@/libs/encryption';
使用方式
参数1: ip
参数2: macWhiteList
let encryptedStr = encryption.encryption('1234567', '00-FF-24-95-7F-90');
最终链接拼接
appid为第三方用户appid
encryptedStr为第二步加密字符串
uat:https://xxx/api/Auth/thirdAuthRedirect/{appid}?cdata=encryptedStr
dev:https://xxx/api/Auth/thirdAuthRedirect/{appid}?cdata=encryptedStr
prod:https://xxx/api/Auth/thirdAuthRedirect/{appid}?cdata=encryptedStr
参考返回值
{
"code": 200,
"data": "https://xxx.cn/cidp/custom/ai-b14dbcfdc78a4889ad238ceda2d84495?id_token=eyJraWQiOiJkb2VyIiwidHlwIjoiSldUIiwiYWxnIjoiUlMyNTYifQ.eyJhdWQiOiJ5dWZ1Iiwic3ViIjoiMTgzNjM4NTU5MjciLCJ0bnRfaWQiOiJ0bi02Njk4OWE3YjU1MTU0YjcyODdlYjMzMTRhMmJiMjBjNCIsImlzcyI6ImRvZXIiLCJleHAiOjE2NTU4NjQ1NTUsImlhdCI6MTY1NTg2NDI1NX0.P_kwG9KisvppPXGxam_ylbrPSg_gsBa6OSQ1wO4T9p0kkiKwdODGPTUW_i3ZPsiNGB-wxzbekzPzp1IzpO_B5CU2g-C58EmT8Lv8ojJJNW1f4NAiCbbEegbL0sIt5nXjBf9GLDPzWJvxGZ_kYBRmGv4WT6ItTf2HZBVxf0yHUKA",
"message": "操作成功",
"requestId": "7acdd08bf1d111ecb87e00ff12ed8011"
}