proper null check for client's preferred signature method
parent
07bec462cc
commit
ca777f7dc4
|
@ -89,12 +89,9 @@ public class ConnectTokenEnhancer implements TokenEnhancer {
|
||||||
|
|
||||||
claims.setJWTID(UUID.randomUUID().toString()); // set a random NONCE in the middle of it
|
claims.setJWTID(UUID.randomUUID().toString()); // set a random NONCE in the middle of it
|
||||||
|
|
||||||
JWSAlgorithm signingAlg;
|
JWSAlgorithm signingAlg = jwtService.getDefaultSigningAlgorithm();
|
||||||
JWSAlgorithm clientAlg = client.getIdTokenSignedResponseAlg().getAlgorithm();
|
if (client.getIdTokenSignedResponseAlg() != null) {
|
||||||
if (clientAlg != null) {
|
signingAlg = client.getIdTokenSignedResponseAlg().getAlgorithm();
|
||||||
signingAlg = clientAlg;
|
|
||||||
} else {
|
|
||||||
signingAlg = jwtService.getDefaultSigningAlgorithm();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
SignedJWT signed = new SignedJWT(new JWSHeader(signingAlg), claims);
|
SignedJWT signed = new SignedJWT(new JWSHeader(signingAlg), claims);
|
||||||
|
|
Loading…
Reference in New Issue