Title: 完善微信小程序消息推送(安全模式)JSON 入参的验签解密能力 by Copilot · Pull Request #4069 · binarywang/WxJava · GitHub
Open Graph Title: 完善微信小程序消息推送(安全模式)JSON 入参的验签解密能力 by Copilot · Pull Request #4069 · binarywang/WxJava
X Title: 完善微信小程序消息推送(安全模式)JSON 入参的验签解密能力 by Copilot · Pull Request #4069 · binarywang/WxJava
Description: 当前 WxMaMessage 对安全模式 XML 已支持“验签+解密”,但 JSON 仅支持解密,导致调用方需要手工提取 Encrypt 并自行验签。该变更补齐 JSON 与 XML 在安全模式下的能力对齐,支持直接完成来源校验与解密。 变更一:补充 JSON 安全模式重载(验签 + 解密) 在 WxMaMessage 新增 5 参数重载: fromEncryptedJson(String encryptedJson, WxMaConfig config, String timestamp, String nonce, String msgSignature) fromEncryptedJson(InputStream inputStream, WxMaConfig config, String timestamp, String nonce, String msgSignature) 解析 Encrypt 后复用 WxMaCryptUtils.decryptContent(...),按 token/timestamp/nonce/msgSignature 完成签名校验并解密。 变更二:保持兼容 原有 2 参数 fromEncryptedJson(String/InputStream, WxMaConfig) 保持不变,继续提供“仅解密”行为,不影响既有调用。 变更三:补充针对性用例 增加 JSON 安全模式成功路径(验签通过后正常解密解析)与失败路径(签名不匹配抛异常)覆盖,确保新重载行为清晰可预期。 示例调用: WxMaMessage message = WxMaMessage.fromEncryptedJson( encryptedJson, wxMaConfig, timestamp, nonce, msgSignature );
Open Graph Description: 当前 WxMaMessage 对安全模式 XML 已支持“验签+解密”,但 JSON 仅支持解密,导致调用方需要手工提取 Encrypt 并自行验签。该变更补齐 JSON 与 XML 在安全模式下的能力对齐,支持直接完成来源校验与解密。 变更一:补充 JSON 安全模式重载(验签 + 解密) 在 WxMaMessage 新增 5 参数重载: fromEncryptedJson(Str...
X Description: 当前 WxMaMessage 对安全模式 XML 已支持“验签+解密”,但 JSON 仅支持解密,导致调用方需要手工提取 Encrypt 并自行验签。该变更补齐 JSON 与 XML 在安全模式下的能力对齐,支持直接完成来源校验与解密。 变更一:补充 JSON 安全模式重载(验签 + 解密) 在 WxMaMessage 新增 5 参数重载: fromEncryptedJson(Str...
Opengraph URL: https://github.com/binarywang/WxJava/pull/4069
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:78539225-9e9f-4691-20b5-502bfb66aea2 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | A1CE:4B803:22951CB:2E53ACC:6A59953E |
| html-safe-nonce | e5e7e8c8759a5465072d9bd50c8adcacd0bd2ca24cb195b6faf0bfe262a1c39f |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMUNFOjRCODAzOjIyOTUxQ0I6MkU1M0FDQzo2QTU5OTUzRSIsInZpc2l0b3JfaWQiOiIzNjM5NjA4MDkwNzQyNTkyODMwIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 137d775ec90d22212767d5a874dd9702a80020ab50eae0f1662242a5014668b0 |
| hovercard-subject-tag | pull_request:4057500582 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/binarywang/WxJava/pull/4069/files |
| twitter:image | https://avatars.githubusercontent.com/in/1143301?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/in/1143301?s=400&v=4 |
| og:image:alt | 当前 WxMaMessage 对安全模式 XML 已支持“验签+解密”,但 JSON 仅支持解密,导致调用方需要手工提取 Encrypt 并自行验签。该变更补齐 JSON 与 XML 在安全模式下的能力对齐,支持直接完成来源校验与解密。 变更一:补充 JSON 安全模式重载(验签 + 解密) 在 WxMaMessage 新增 5 参数重载: fromEncryptedJson(Str... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | a540949572872b935b393b36db38922db390ae71c859537d741b8f3eb7e545b5 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/binarywang/WxJava git https://github.com/binarywang/WxJava.git |
| octolytics-dimension-user_id | 1343140 |
| octolytics-dimension-user_login | binarywang |
| octolytics-dimension-repository_id | 49122742 |
| octolytics-dimension-repository_nwo | binarywang/WxJava |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 49122742 |
| octolytics-dimension-repository_network_root_nwo | binarywang/WxJava |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 737e0bf019c29d8431b268ae84d528b052789210 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width