Skip to content

Commit a3a66aa

Browse files
committed
Fix "typ" header value in NimbusJwtEncoder-encoded JWT
Closes gh-18269 Signed-off-by: Ziqin Wang <ziqin@wangziqin.net>
1 parent 12f2622 commit a3a66aa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

oauth2/oauth2-jose/src/main/java/org/springframework/security/oauth2/jwt/NimbusJwtEncoder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ private NimbusJwtEncoder(JWK jwk) {
136136
algorithm = MacAlgorithm.from(jwk.getAlgorithm().getName());
137137
}
138138
Assert.notNull(algorithm, "Failed to derive supported algorithm from " + jwk.getAlgorithm());
139-
JwsHeader.Builder builder = JwsHeader.with(algorithm).type(jwk.getKeyType().getValue()).keyId(jwk.getKeyID());
139+
JwsHeader.Builder builder = JwsHeader.with(algorithm).type("JWT").keyId(jwk.getKeyID());
140140
URI x509Url = jwk.getX509CertURL();
141141
if (x509Url != null) {
142142
builder.x509Url(jwk.getX509CertURL().toASCIIString());

0 commit comments

Comments
 (0)