云商店-auth Token取值说明:举例

时间:2023-11-01 16:25:34

举例

商家收到的调用请求示例如下:

post方式:https://www.isvwebsite.com/saasproduceConnection: keep-aliveContent-Type: application/jsonauthToken: “xxxxxxxxxxxxxx”Host: www.isvwebsite.comUser-Agent: Apache-HttpClient/4.5.3 (Java/1.8.0_191){"p1": "1","p2": "2","p3": "3","timeStamp": "201706211855321"}
  1. 获取所有的post请求body参数:p1p2p3timeStamp
  2. 进行字典排序:sort(p1, p2, p3,timeStamp),假设排序后的顺序是p1p3p2timeStamp
  3. 生成authToken值:base64_encode(HMAC_SHA256(Key+timeStamp, p1=1&p3=3&p2=2&timeStamp=201706211855321))

所有参数的值云商店都经过了URL编码,商家取到参数值应先进行URL解码。

support.huaweicloud.com/accessg-marketplace/zh-cn_topic_0070649135.html