Skip to content

Commit 9b1c9c3

Browse files
committed
docs: correct sign api standard
1 parent 8606bd5 commit 9b1c9c3

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

acidify-docs/content/yogurt/signing.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ Content-Type: application/json
2929

3030
```json
3131
{
32+
"platform": "Linux",
33+
"version": "3.2.19-39038",
3234
"data": {
3335
"sign": "0123456789abcdef",
3436
"token": "0123456789abcdef",
@@ -37,6 +39,12 @@ Content-Type: application/json
3739
}
3840
```
3941

42+
其中:
43+
44+
- `platform` 的值必须与初始化所用的 `AppInfo``Os` 相同;
45+
- `version` 的值必须与初始化所用的 `AppInfo``CurrentVersion` 相同;
46+
- `data` 中的 `sign``token``extra` 为签名所需字段,必须是 HEX 字符串或空字符串,下同。
47+
4048
以上所列为响应中必须包含的字段,开发者可以根据实际情况添加其他字段,下同,不再赘述。
4149

4250
### GET `$BASE/appinfo`
@@ -97,6 +105,8 @@ Content-Type: application/json
97105

98106
```json
99107
{
108+
"code": 0,
109+
"msg": "",
100110
"data": {
101111
"sign": "0123456789abcdef",
102112
"token": "0123456789abcdef",
@@ -105,6 +115,12 @@ Content-Type: application/json
105115
}
106116
```
107117

118+
其中:
119+
120+
- `code` 的值为 `0` 表示成功,非 `0` 表示失败,下同;
121+
- `msg` 的值为错误信息,成功时可以为空字符串,下同;
122+
- `data``code``0` 时必须包含;在 `code``0` 时不应包含,下同。
123+
108124
### POST `$BASE/energy`
109125

110126
用于获取 TLV 0x544 所需的字节序列。
@@ -129,10 +145,14 @@ Content-Type: application/json
129145

130146
```json
131147
{
148+
"code": 0,
149+
"msg": "",
132150
"data": "0123456789abcdef"
133151
}
134152
```
135153

154+
其中 `data` 必须是 HEX 字符串。
155+
136156
### POST `$BASE/get_tlv553`
137157

138158
用于获取 TLV 0x553 所需的字节序列(Debug XWID)。
@@ -156,10 +176,14 @@ Content-Type: application/json
156176

157177
```json
158178
{
179+
"code": 0,
180+
"msg": "",
159181
"data": "0123456789abcdef"
160182
}
161183
```
162184

185+
其中 `data` 必须是 HEX 字符串。
186+
163187
## Android 签名(Legacy)
164188

165189
> [!note]
@@ -195,6 +219,8 @@ Content-Type: application/json
195219

196220
```json
197221
{
222+
"code": 0,
223+
"msg": "",
198224
"data": {
199225
"sign": "0123456789abcdef",
200226
"token": "0123456789abcdef",
@@ -227,6 +253,8 @@ Content-Type: application/json
227253

228254
```json
229255
{
256+
"code": 0,
257+
"msg": "",
230258
"data": "0123456789abcdef"
231259
}
232260
```

0 commit comments

Comments
 (0)