Browse Source

put 'kid' into JWS header, closes #784

pull/873/head
Justin Richer 10 years ago
parent
commit
22c86d09f8
  1. 6
      openid-connect-server/src/main/java/org/mitre/openid/connect/service/impl/DefaultOIDCTokenService.java

6
openid-connect-server/src/main/java/org/mitre/openid/connect/service/impl/DefaultOIDCTokenService.java

@ -178,9 +178,13 @@ public class DefaultOIDCTokenService implements OIDCTokenService {
// sign it with the client's secret
signer.signJwt((SignedJWT) idToken);
} else {
idClaims.setCustomClaim("kid", jwtService.getDefaultSignerKeyId());
idToken = new SignedJWT(new JWSHeader(signingAlg), idClaims);
JWSHeader header = new JWSHeader(signingAlg);
header.setKeyID(jwtService.getDefaultSignerKeyId());
idToken = new SignedJWT(header, idClaims);
// sign it with the server's key
jwtService.signJwt((SignedJWT) idToken);

Loading…
Cancel
Save