华为云APP认证
2022-11-21 16:59:41 0 举报
华为云APP认证流程
作者其他创作
大纲/内容
CanonicalQueryString
SingedHeaders
HashedCanonicalRequest
CanonicalURI
华为云APP认证
App Secret
body为空则为空字符串。先SHA-256哈希,然后转十六进制,如e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
HTTP请求方法,如POST
规范请求头,必须包含X-Sdk-Date,没有则以当前时间赋值,Host没有也加上,如host:apigw.exampleRegion.comx-sdk-date:20221111T093443Z
RequestDateTime
HTTPRequestMethod + '\' + CanonicalURI + '\' + CanonicalQueryString + '\' + CanonicalHeaders + '\' + SignedHeaders + '\' + HexEncode(Hash(RequestPayload))如GET/app1/a=1&b=2host:c967a237-cd6c-470e-906f-a8655461897e.apigw.exampleRegion.comx-sdk-date:20191111T093443Zhost;x-sdk-datee3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
App Key
HexEncode(Hash(RequestPayload))
HTTPRequestMethod
App Secret 来自API应用管理
CanonicalHeaders
Algorithm + \ + RequestDateTime + \ + HashedCanonicalRequest,如SDK-HMAC-SHA25620191111T093443Zaf71c5a7ef45310b8dc05ab15f7da50189ffa81a95cc284379ebaa5eb61155c0
StringToSign
规范查询字符串,及查询参数,没有则为空字符串,如parm1=value1&parm2=
App Key 来自API应用管理
CanonicalRequest
请求时间戳,与请求头X-Sdk-Date值相同,格式YYYYMMDDTHHMMSSZ,如20191111T093443Z
签名算法 SDK-HMAC-SHA256
Algorithm
规范URI,请求资源路径,以\"/\"结尾,如/app/
Signature
用于签名的消息头声明,X-Sdk-Date是必选项,都要转成小写形式,且按按自然序排序,如host;x-sdk-date
先哈希再转成小写十六进制字符串Lowercase(HexEncode(Hash.SHA256(CanonicalRequest)))
Authorzation
0 条评论
下一页