Package org.keycloak.rotation
Class HardcodedKeyLocator
- java.lang.Object
-
- org.keycloak.rotation.HardcodedKeyLocator
-
- All Implemented Interfaces:
Iterable<Key>,KeyLocator
public class HardcodedKeyLocator extends Object implements KeyLocator, Iterable<Key>
Key locator that always returns a specified key.- Author:
- Hynek Mlnařík
-
-
Constructor Summary
Constructors Constructor Description HardcodedKeyLocator(Key key)HardcodedKeyLocator(Collection<? extends Key> keys)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description KeygetKey(String kid)Returns a key with a particular ID.Iterator<Key>iterator()voidrefreshKeyCache()If this key locator caches keys in any way, forces this cache cleanup and refreshing the keys.StringtoString()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Constructor Detail
-
HardcodedKeyLocator
public HardcodedKeyLocator(Key key)
-
HardcodedKeyLocator
public HardcodedKeyLocator(Collection<? extends Key> keys)
-
-
Method Detail
-
getKey
public Key getKey(String kid)
Description copied from interface:KeyLocatorReturns a key with a particular ID.- Specified by:
getKeyin interfaceKeyLocator- Parameters:
kid- Key ID- Returns:
- key, which should be used for verify signature on given "input"
-
refreshKeyCache
public void refreshKeyCache()
Description copied from interface:KeyLocatorIf this key locator caches keys in any way, forces this cache cleanup and refreshing the keys.- Specified by:
refreshKeyCachein interfaceKeyLocator
-
-