Skip to content

Commit b09503a

Browse files
committed
user info endpoint response uses correct client algorithms, addresses mitreid-connect#921
1 parent d03bebe commit b09503a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

openid-connect-server/src/main/java/org/mitre/openid/connect/view/UserInfoJwtView.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,8 @@ protected void writeOut(JsonObject json, Map<String, Object> model,
9999
claims.setJWTID(UUID.randomUUID().toString()); // set a random NONCE in the middle of it
100100

101101

102-
if (client.getIdTokenEncryptedResponseAlg() != null && !client.getIdTokenEncryptedResponseAlg().equals(Algorithm.NONE)
103-
&& client.getIdTokenEncryptedResponseEnc() != null && !client.getIdTokenEncryptedResponseEnc().equals(Algorithm.NONE)
102+
if (client.getUserInfoEncryptedResponseAlg() != null && !client.getUserInfoEncryptedResponseAlg().equals(Algorithm.NONE)
103+
&& client.getUserInfoEncryptedResponseEnc() != null && !client.getUserInfoEncryptedResponseEnc().equals(Algorithm.NONE)
104104
&& !Strings.isNullOrEmpty(client.getJwksUri())) {
105105

106106
// encrypt it to the client's key
@@ -109,7 +109,7 @@ protected void writeOut(JsonObject json, Map<String, Object> model,
109109

110110
if (encrypter != null) {
111111

112-
EncryptedJWT encrypted = new EncryptedJWT(new JWEHeader(client.getIdTokenEncryptedResponseAlg(), client.getIdTokenEncryptedResponseEnc()), claims);
112+
EncryptedJWT encrypted = new EncryptedJWT(new JWEHeader(client.getUserInfoEncryptedResponseAlg(), client.getUserInfoEncryptedResponseEnc()), claims);
113113

114114
encrypter.encryptJwt(encrypted);
115115

0 commit comments

Comments
 (0)