Package org.keycloak.rotation
Interface KeyLocator
-
- All Known Implementing Classes:
CompositeKeyLocator,HardcodedKeyLocator
public interface KeyLocatorThis interface defines a method for obtaining a security key by ID.If the
KeyLocatorimplementor wants to make all its keys available for iteration, it should implementIterable<T extendsKey> interface. The baseKeyLocatordoes not extend this interface to enableKeyLocatorsthat do not support listing their keys.- Author:
- Hynek Mlnařík
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description KeygetKey(String kid)Returns a key with a particular ID.voidrefreshKeyCache()If this key locator caches keys in any way, forces this cache cleanup and refreshing the keys.
-
-
-
Method Detail
-
getKey
Key getKey(String kid) throws KeyManagementException
Returns a key with a particular ID.- Parameters:
kid- Key IDconfiguration- Configuration- Returns:
- key, which should be used for verify signature on given "input"
- Throws:
KeyManagementException
-
refreshKeyCache
void refreshKeyCache()
If this key locator caches keys in any way, forces this cache cleanup and refreshing the keys.
-
-