From 1fd4d8a4b8de22eae5ac91895457ee5851b1cc7f Mon Sep 17 00:00:00 2001 From: Jon Kranes Date: Tue, 31 Jul 2012 12:17:01 -0400 Subject: [PATCH] fixed signer map in client/AbstractOIDCAuthenticationFilter.java --- .../client/AbstractOIDCAuthenticationFilter.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/openid-connect-client/src/main/java/org/mitre/openid/connect/client/AbstractOIDCAuthenticationFilter.java b/openid-connect-client/src/main/java/org/mitre/openid/connect/client/AbstractOIDCAuthenticationFilter.java index 0ca23aee8..799d78e90 100644 --- a/openid-connect-client/src/main/java/org/mitre/openid/connect/client/AbstractOIDCAuthenticationFilter.java +++ b/openid-connect-client/src/main/java/org/mitre/openid/connect/client/AbstractOIDCAuthenticationFilter.java @@ -700,16 +700,16 @@ public class AbstractOIDCAuthenticationFilter extends RSAPublicKey rsaKey = (RSAPublicKey)signingKey; // build an RSA signer - RsaSigner signer256 = new RsaSigner(JwsAlgorithm.RS256.toString(), rsaKey, null); - RsaSigner signer384 = new RsaSigner(JwsAlgorithm.RS384.toString(), rsaKey, null); - RsaSigner signer512 = new RsaSigner(JwsAlgorithm.RS512.toString(), rsaKey, null); + RsaSigner signer256 = new RsaSigner(JwsAlgorithm.RS256.getJwaName(), rsaKey, null); + RsaSigner signer384 = new RsaSigner(JwsAlgorithm.RS384.getJwaName(), rsaKey, null); + RsaSigner signer512 = new RsaSigner(JwsAlgorithm.RS512.getJwaName(), rsaKey, null); - signers.put(serverConfig.getIssuer(), signer256); - signers.put(serverConfig.getIssuer(), signer384); - signers.put(serverConfig.getIssuer(), signer512); + signers.put(serverConfig.getIssuer() + JwsAlgorithm.RS256.getJwaName(), signer256); + signers.put(serverConfig.getIssuer() + JwsAlgorithm.RS384.getJwaName(), signer384); + signers.put(serverConfig.getIssuer() + JwsAlgorithm.RS512.getJwaName(), signer512); } - - JwtSigningAndValidationService signingAndValidationService = new JwtSigningAndValidationServiceDefault(signers); + + JwtSigningAndValidationService signingAndValidationService = new JwtSigningAndValidationServiceDefault(signers); validationServices.put(serverConfig, signingAndValidationService);