优化每日推送接口/api/v1/playx/daily-push
This commit is contained in:
@@ -15,8 +15,11 @@
|
||||
* 方法:`POST`
|
||||
* 路径:`/api/v1/playx/daily-push`
|
||||
|
||||
#### Header(签名校验:可选)
|
||||
当 `playx.daily_push_secret` 配置非空时,需要携带:
|
||||
#### Header(多语言,可选)
|
||||
- `lang`: `zh`/`zh-cn` 返回中文(默认);`en` 返回英文
|
||||
|
||||
#### Header(签名校验:HMAC 必填)
|
||||
当 `playx.daily_push_secret` 配置非空时,需要携带(HMAC):
|
||||
- `X-Request-Id`:请求 ID
|
||||
- `X-Timestamp`:时间戳
|
||||
- `X-Signature`:签名(HMAC_SHA256)
|
||||
@@ -26,6 +29,9 @@
|
||||
- `expected = hash_hmac('sha256', canonical, daily_push_secret)`
|
||||
- 校验:`hash_equals(expected, X-Signature)`
|
||||
|
||||
说明:
|
||||
- 本项目对接方案为 **仅启用 HMAC**,不使用 `Authorization` 头做校验。
|
||||
|
||||
#### Body
|
||||
| 字段 | 类型 | 必填 | 说明 |
|
||||
|------|------|------|------|
|
||||
|
||||
Reference in New Issue
Block a user