Class SamlDescriptorPublicKeyLocator
- java.lang.Object
-
- org.keycloak.adapters.saml.rotation.SamlDescriptorPublicKeyLocator
-
- All Implemented Interfaces:
Iterable<PublicKey>,KeyLocator
public class SamlDescriptorPublicKeyLocator extends Object implements KeyLocator, Iterable<PublicKey>
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
-
-
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)Iterator<PublicKey>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
-
-
-
-
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
-
refreshKeyCache
public void refreshKeyCache()
- Specified by:
refreshKeyCachein interfaceKeyLocator
-
-