Class SamlDescriptorPublicKeyLocator
- java.lang.Object
-
- org.keycloak.adapters.saml.rotation.SamlDescriptorPublicKeyLocator
-
- All Implemented Interfaces:
Iterable<Key>,KeyLocator
public class SamlDescriptorPublicKeyLocator extends Object implements KeyLocator
This class defines aKeyLocatorthat looks up public keys and certificates in IdP's SAML descriptor (i.e. http://{host}/auth/realms/{realm}/protocol/saml/descriptor). Based onJWKPublicKeyLocator.- Author:
- hmlnarik
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.keycloak.rotation.KeyLocator
KeyLocator.KeyHash
-
-
Constructor Summary
Constructors Constructor Description SamlDescriptorPublicKeyLocator(String descriptorUrl, int minTimeBetweenDescriptorRequests, int cacheEntryTtl, org.apache.http.client.HttpClient httpClient)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description KeygetKey(String kid)KeygetKey(Key key)Iterator<Key>iterator()voidrefreshKeyCache()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
-
Methods inherited from interface org.keycloak.rotation.KeyLocator
getKey
-
-
-
-
Constructor Detail
-
SamlDescriptorPublicKeyLocator
public SamlDescriptorPublicKeyLocator(String descriptorUrl, int minTimeBetweenDescriptorRequests, int cacheEntryTtl, org.apache.http.client.HttpClient httpClient)
-
-
Method Detail
-
getKey
public Key getKey(String kid) throws KeyManagementException
- Specified by:
getKeyin interfaceKeyLocator- Throws:
KeyManagementException
-
getKey
public Key getKey(Key key) throws KeyManagementException
- Specified by:
getKeyin interfaceKeyLocator- Throws:
KeyManagementException
-
refreshKeyCache
public void refreshKeyCache()
- Specified by:
refreshKeyCachein interfaceKeyLocator
-
-