Table of Contents
18.5 AAD 精确定义
AAD 按 UTF-8 编码,字段之间使用一个半角竖线 |,不得增加空格或换行。
18.5.1 握手请求 AAD
tieup-api-handshake-v1|request|<platform_int>|<channel>|<build>|<sha256(device_id)>
18.5.2 握手响应 AAD
tieup-api-handshake-v1|response|<platform_int>|<channel>|<build>|<sha256(device_id)>
sha256(device_id) 是设备标识 UTF-8 字节的 SHA-256 小写十六进制字符串。
18.5.3 业务请求 AAD
tieup-api-encryption-v1|<UPPERCASE_METHOD>|<URI_PATH>|<session_id>|<platform_int>|<channel>|<build>
URI_PATH 只取实际 URL path,不包含 scheme、host、端口、query 和 fragment,但必须保留路径参数。例如:
tieup-api-encryption-v1|GET|/tieup/api/v1/artist/fans/10001|tieup_sess_xxx|2|main|10001
?e=... 不进入 AAD。路径大小写、URL 解码结果或末尾斜杠发生变化都会导致认证失败;客户端构造 AAD 时必须使用最终发出的请求路径。