面向业务/物联运维平台之间的互跳场景:已登录一端 → /system/oauth2/authorize 拿 code → 浏览器重定向 → 另一端调用本接口用 code 换 access_token。 安全要点: - body 传参而非 query,code/state 不落 nginx access log 和浏览器历史 - client_secret 不传:secret 仅存 DB,验证安全性来自 OAuth2 code 一次性 + redirect_uri 白名单 + state 一致性 + short TTL - state 入参改为必填(@NotBlank),强制 CSRF 防护 - 日志中 code 截断(前 6 + ***+ 末 2),state 只记录长度不暴露值 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>