我正在尝试集成需要 URL 中的签名查询参数的 Apple Map Web Snapshot。我能够在 NPM 的 JWA 包中成功生成和验证 ES256 签名,但不能在 Java 中生成和验证。请帮助我找到等效的库以生成有效的签名,我在 Java 中尝试了几个 JWA 库。
// Required modules.
const { readFileSync } = require("fs");
const { sign } = require("jwa")("ES256");
/* Read your private key from the file system. (Never add your private key
* in code or in source control. Always keep it secure.)
*/
const privateKey = readFileSync("[file_system_path]");
// Replace the team ID and key ID values with your actual values.
const teamId = …
Run Code Online (Sandbox Code Playgroud)