修复小程序 checkSessionKey 接口地址和签名生成 - #4124
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
🤖 Augment PR Summary摘要:此 PR 修复小程序登录态校验接口的调用契约。
🤖 Was this summary useful? React with 👍 or 👎 |
There was a problem hiding this comment.
🟢 Approval recommended
No unresolved issues were identified that would block approval.
Pull request overview
修复小程序检查登录态接口路径及 HMAC-SHA256 签名生成逻辑,并新增不出网回归测试。
Changes:
- 将接口地址修正为
/wxa/checksession。 - 使用
sessionKey对空字符串生成 HMAC-SHA256 签名。 - 新增 URL 与签名校验测试。
File summaries
| File | Description |
|---|---|
| weixin-java-miniapp/src/test/java/cn/binarywang/wx/miniapp/api/impl/WxMaUserServiceImplCheckSessionKeyTest.java | Updated as part of this pull request. |
| weixin-java-miniapp/src/main/java/cn/binarywang/wx/miniapp/constant/WxMaApiUrlConstants.java | Updated as part of this pull request. |
| weixin-java-miniapp/src/main/java/cn/binarywang/wx/miniapp/api/impl/WxMaUserServiceImpl.java | Updated as part of this pull request. |
Review details
- Files reviewed: 3/3 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 23721d1055
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
变更说明
checkSessionKey接口地址,将/wxa/checksessionkey调整为微信官方文档中的/wxa/checksessionsessionKey对空字符串进行 HMAC-SHA256 签名验证
mvn -pl weixin-java-miniapp -Dtest=WxMaUserServiceImplCheckSessionKeyTest,WxMaUserServiceImplPhoneNumberTest,WxMaInternetServiceImplSignatureTest test结果:4 个用例通过,0 失败。
Fixes #4123