2121import com .auth0 .jwt .exceptions .oicmsg_exceptions .UnknownKeyType ;
2222import com .auth0 .jwt .exceptions .oicmsg_exceptions .ValueError ;
2323import com .auth0 .msg .Key ;
24- import com .auth0 .msg .KeyType ;
2524import java .io .IOException ;
2625import java .util .ArrayList ;
2726import java .util .HashMap ;
@@ -89,7 +88,7 @@ public void testFailureAudienceNotMatchingClientIdParameter() throws InvalidClai
8988 public void testSuccessValidIdToken () throws InvalidClaimException , IllegalArgumentException ,
9089 ImportException , UnknownKeyType , ValueError , IOException , SerializationException , JWKException , DeserializationException {
9190 // Add id token to response as OP would propably add
92- Key key = getKeyJarPrv ().getSigningKey (KeyType . RSA . name () , keyOwner , null , null ).get (0 );
91+ Key key = getKeyJarPrv ().getSigningKey (" RSA" , keyOwner , null , null ).get (0 );
9392 String jwt = generateIdTokenNow (new HashMap <String , Object >(), key , "RS256" );
9493 AuthenticationResponse resp = new AuthenticationResponse ();
9594 resp .addClaim ("id_token" , jwt );
@@ -115,7 +114,7 @@ public void testSuccessValidIdToken() throws InvalidClaimException, IllegalArgum
115114 public void testCHashMissingFailure () throws InvalidClaimException , IllegalArgumentException ,
116115 ImportException , UnknownKeyType , ValueError , IOException , SerializationException , JWKException {
117116 String code = "AUTHORIZATION_CODE" ;
118- Key key = getKeyJarPrv ().getSigningKey (KeyType . RSA . name () , keyOwner , null , null ).get (0 );
117+ Key key = getKeyJarPrv ().getSigningKey (" RSA" , keyOwner , null , null ).get (0 );
119118 HashMap <String , Object > claims = new HashMap <String , Object >();
120119 String jwt = generateIdTokenNow (claims , key , "RS256" );
121120 AuthenticationResponse resp = new AuthenticationResponse ();
@@ -128,7 +127,7 @@ public void testCHashMissingFailure() throws InvalidClaimException, IllegalArgum
128127 public void testCHashInvalidFailure () throws InvalidClaimException , IllegalArgumentException ,
129128 ImportException , UnknownKeyType , ValueError , IOException , SerializationException , JWKException {
130129 String code = "AUTHORIZATION_CODE" ;
131- Key key = getKeyJarPrv ().getSigningKey (KeyType . RSA . name () , keyOwner , null , null ).get (0 );
130+ Key key = getKeyJarPrv ().getSigningKey (" RSA" , keyOwner , null , null ).get (0 );
132131 HashMap <String , Object > claims = new HashMap <String , Object >();
133132 claims .put ("c_hash" , "BADGUESS" );
134133 String jwt = generateIdTokenNow (claims , key , "RS256" );
@@ -142,7 +141,7 @@ public void testCHashInvalidFailure() throws InvalidClaimException, IllegalArgum
142141 public void testCHashSuccess () throws InvalidClaimException , IllegalArgumentException ,
143142 ImportException , UnknownKeyType , ValueError , IOException , SerializationException , JWKException {
144143 String code = "AUTHORIZATION_CODE" ;
145- Key key = getKeyJarPrv ().getSigningKey (KeyType . RSA . name () , keyOwner , null , null ).get (0 );
144+ Key key = getKeyJarPrv ().getSigningKey (" RSA" , keyOwner , null , null ).get (0 );
146145 HashMap <String , Object > claims = new HashMap <String , Object >();
147146 claims .put ("c_hash" , TokenHash .compute (code , "RS256" ));
148147 String jwt = generateIdTokenNow (claims , key , "RS256" );
@@ -156,7 +155,7 @@ public void testCHashSuccess() throws InvalidClaimException, IllegalArgumentExce
156155 public void testAtHashMissingFailure () throws InvalidClaimException , IllegalArgumentException ,
157156 ImportException , UnknownKeyType , ValueError , IOException , SerializationException , JWKException {
158157 String accessToken = "ACCESS_TOKEN" ;
159- Key key = getKeyJarPrv ().getSigningKey (KeyType . RSA . name () , keyOwner , null , null ).get (0 );
158+ Key key = getKeyJarPrv ().getSigningKey (" RSA" , keyOwner , null , null ).get (0 );
160159 HashMap <String , Object > claims = new HashMap <String , Object >();
161160 String jwt = generateIdTokenNow (claims , key , "RS256" );
162161 AuthenticationResponse resp = new AuthenticationResponse ();
@@ -169,7 +168,7 @@ public void testAtHashMissingFailure() throws InvalidClaimException, IllegalArgu
169168 public void testAtHashInvalidFailure () throws InvalidClaimException , IllegalArgumentException ,
170169 ImportException , UnknownKeyType , ValueError , IOException , SerializationException , JWKException {
171170 String accessToken = "ACCESS_TOKEN" ;
172- Key key = getKeyJarPrv ().getSigningKey (KeyType . RSA . name () , keyOwner , null , null ).get (0 );
171+ Key key = getKeyJarPrv ().getSigningKey (" RSA" , keyOwner , null , null ).get (0 );
173172 HashMap <String , Object > claims = new HashMap <String , Object >();
174173 claims .put ("at_hash" , "BADGUESS" );
175174 String jwt = generateIdTokenNow (claims , key , "RS256" );
@@ -183,7 +182,7 @@ public void testAtHashInvalidFailure() throws InvalidClaimException, IllegalArgu
183182 public void testAtHashSuccess () throws InvalidClaimException , IllegalArgumentException ,
184183 ImportException , UnknownKeyType , ValueError , IOException , SerializationException , JWKException {
185184 String accessToken = "ACCESS_TOKEN" ;
186- Key key = getKeyJarPrv ().getSigningKey (KeyType . RSA . name () , keyOwner , null , null ).get (0 );
185+ Key key = getKeyJarPrv ().getSigningKey (" RSA" , keyOwner , null , null ).get (0 );
187186 HashMap <String , Object > claims = new HashMap <String , Object >();
188187 claims .put ("at_hash" , TokenHash .compute (accessToken , "RS256" ));
189188 String jwt = generateIdTokenNow (claims , key , "RS256" );
0 commit comments