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 Key
getKey(String kid)
Returns a key with a particular ID.Iterator<Key>
iterator()
void
refreshKeyCache()
If this key locator caches keys in any way, forces this cache cleanup and refreshing the keys.String
toString()
-
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: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"
-
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
-
-