开放接口,修复上游同步不对的问题
All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 7m55s

This commit is contained in:
2026-05-11 11:20:48 +08:00
parent a9eaf1d697
commit 98ff88d5c3
25 changed files with 1432 additions and 39 deletions

View File

@@ -13,6 +13,13 @@ func RedisAuthTokenKey(token string) string {
return fmt.Sprintf("auth:token:%s", token)
}
// RedisAgentOpenAPINonceKey 生成代理开放接口 nonce 防重放 Redis 键
// 用途:记录账号在签名时间窗内已使用的随机串,防止重复请求
// 过期时间:与开放接口签名时间窗一致
func RedisAgentOpenAPINonceKey(account, nonce string) string {
return fmt.Sprintf("agent_open_api:nonce:%s:%s", account, nonce)
}
// RedisRefreshTokenKey 生成刷新令牌的 Redis 键
// 用途:存储用户 refresh token 信息
// 过期时间7 天(可配置)