From b09503aadb724e9b6841c6865d514259593f8c15 Mon Sep 17 00:00:00 2001 From: Justin Richer Date: Fri, 2 Oct 2015 18:48:25 -0400 Subject: [PATCH] user info endpoint response uses correct client algorithms, addresses #921 --- .../java/org/mitre/openid/connect/view/UserInfoJwtView.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/openid-connect-server/src/main/java/org/mitre/openid/connect/view/UserInfoJwtView.java b/openid-connect-server/src/main/java/org/mitre/openid/connect/view/UserInfoJwtView.java index 0f4287f11..f4f50d686 100644 --- a/openid-connect-server/src/main/java/org/mitre/openid/connect/view/UserInfoJwtView.java +++ b/openid-connect-server/src/main/java/org/mitre/openid/connect/view/UserInfoJwtView.java @@ -99,8 +99,8 @@ public class UserInfoJwtView extends UserInfoView { claims.setJWTID(UUID.randomUUID().toString()); // set a random NONCE in the middle of it - if (client.getIdTokenEncryptedResponseAlg() != null && !client.getIdTokenEncryptedResponseAlg().equals(Algorithm.NONE) - && client.getIdTokenEncryptedResponseEnc() != null && !client.getIdTokenEncryptedResponseEnc().equals(Algorithm.NONE) + if (client.getUserInfoEncryptedResponseAlg() != null && !client.getUserInfoEncryptedResponseAlg().equals(Algorithm.NONE) + && client.getUserInfoEncryptedResponseEnc() != null && !client.getUserInfoEncryptedResponseEnc().equals(Algorithm.NONE) && !Strings.isNullOrEmpty(client.getJwksUri())) { // encrypt it to the client's key @@ -109,7 +109,7 @@ public class UserInfoJwtView extends UserInfoView { if (encrypter != null) { - EncryptedJWT encrypted = new EncryptedJWT(new JWEHeader(client.getIdTokenEncryptedResponseAlg(), client.getIdTokenEncryptedResponseEnc()), claims); + EncryptedJWT encrypted = new EncryptedJWT(new JWEHeader(client.getUserInfoEncryptedResponseAlg(), client.getUserInfoEncryptedResponseEnc()), claims); encrypter.encryptJwt(encrypted);