njau_bot/docs/Sign.md
2025-09-04 17:53:45 +08:00

14 lines
617 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 签名算法的说明
## 服务提供方式
nginx代理转发
部署的域名为: https://lgsiot.njau.edu.cn/bot
## 约定token的值为
aB3$dEfGhiJkLmNoPqRsTuVwXyZ!@#4f5e6d7c8b9a0f1e2d
## 所有接口调用都必须传递签名值,签名值算法如下:
参数签名算法,算法逻辑如下:
1. 将对象转换成JSON字符串str1, str1即为post请求中的body体
2. 将str1进行和给定的token值进行拼接后然后对字符串进行md5加密, 格式如何: md5_str = md5($token + str1 + $token)
3. md5_str放到post请求的header里面格式如下: sign: md5_str