|
|
@ -94,6 +94,7 @@ public class DefaultJwtSigningAndValidationService implements JwtSigningAndValid
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
public DefaultJwtSigningAndValidationService(JWKSetKeyStore keyStore) throws NoSuchAlgorithmException, InvalidKeySpecException {
|
|
|
|
public DefaultJwtSigningAndValidationService(JWKSetKeyStore keyStore) throws NoSuchAlgorithmException, InvalidKeySpecException {
|
|
|
|
// convert all keys in the keystore to a map based on key id
|
|
|
|
// convert all keys in the keystore to a map based on key id
|
|
|
|
|
|
|
|
if (keyStore!= null && keyStore.getJwkSet() != null) {
|
|
|
|
for (JWK key : keyStore.getKeys()) {
|
|
|
|
for (JWK key : keyStore.getKeys()) {
|
|
|
|
if (!Strings.isNullOrEmpty(key.getKeyID())) {
|
|
|
|
if (!Strings.isNullOrEmpty(key.getKeyID())) {
|
|
|
|
this.keys.put(key.getKeyID(), key);
|
|
|
|
this.keys.put(key.getKeyID(), key);
|
|
|
@ -101,6 +102,7 @@ public class DefaultJwtSigningAndValidationService implements JwtSigningAndValid
|
|
|
|
throw new IllegalArgumentException("Tried to load a key from a keystore without a 'kid' field: " + key);
|
|
|
|
throw new IllegalArgumentException("Tried to load a key from a keystore without a 'kid' field: " + key);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
//buildSignersAndVerifiers();
|
|
|
|
//buildSignersAndVerifiers();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|