1
0
mirror of synced 2026-05-22 13:23:17 +00:00

Fix "typ" header value in NimbusJwtEncoder-encoded JWT

Closes gh-18269

Signed-off-by: Ziqin Wang <ziqin@wangziqin.net>
This commit is contained in:
Ziqin Wang
2025-12-05 21:29:01 +08:00
committed by Josh Cummings
parent c8898f91fc
commit 1d1b3ff797
@@ -136,7 +136,7 @@ public final class NimbusJwtEncoder implements JwtEncoder {
algorithm = MacAlgorithm.from(jwk.getAlgorithm().getName());
}
Assert.notNull(algorithm, "Failed to derive supported algorithm from " + jwk.getAlgorithm());
JwsHeader.Builder builder = JwsHeader.with(algorithm).type(jwk.getKeyType().getValue()).keyId(jwk.getKeyID());
JwsHeader.Builder builder = JwsHeader.with(algorithm).type("JWT").keyId(jwk.getKeyID());
URI x509Url = jwk.getX509CertURL();
if (x509Url != null) {
builder.x509Url(jwk.getX509CertURL().toASCIIString());