Package org.keycloak.protocol.saml
Class SamlMetadataKeyLocator
java.lang.Object
org.keycloak.protocol.saml.SamlMetadataKeyLocator
- All Implemented Interfaces:
Iterable<Key>
,KeyLocator
KeyLocator that caches the keys into a PublicKeyStorageProvider.
- Author:
- rmartinc
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.keycloak.rotation.KeyLocator
KeyLocator.KeyHash
-
Constructor Summary
ConstructorDescriptionSamlMetadataKeyLocator
(String modelKey, PublicKeyLoader loader, KeyUse use, PublicKeyStorageProvider keyStorage) -
Method Summary
Modifier and TypeMethodDescriptionReturns a key with a particular ID.Method that checks if the key passed is inside the locator.iterator()
void
If this key locator caches keys in any way, forces this cache cleanup and refreshing the keys.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
Methods inherited from interface org.keycloak.rotation.KeyLocator
getKey
-
Constructor Details
-
SamlMetadataKeyLocator
public SamlMetadataKeyLocator(String modelKey, PublicKeyLoader loader, KeyUse use, PublicKeyStorageProvider keyStorage)
-
-
Method Details
-
getKey
Description copied from interface:KeyLocator
Returns a key with a particular ID.- Specified by:
getKey
in interfaceKeyLocator
- Parameters:
kid
- Key ID- Returns:
- key, which should be used for verify signature on given "input"
- Throws:
KeyManagementException
-
getKey
Description copied from interface:KeyLocator
Method that checks if the key passed is inside the locator.- Specified by:
getKey
in interfaceKeyLocator
- Parameters:
key
- The key to search- Returns:
- The same key or null if it's not in the locator
- Throws:
KeyManagementException
-
refreshKeyCache
public void refreshKeyCache()Description copied from interface:KeyLocator
If this key locator caches keys in any way, forces this cache cleanup and refreshing the keys.- Specified by:
refreshKeyCache
in interfaceKeyLocator
-
iterator
-