Package de.xima.fc.security.pac4j.saml
Class ExtendedSAML2IdentityProviderMetadataResolver
- java.lang.Object
-
- de.xima.fc.security.pac4j.saml.ExtendedSAML2IdentityProviderMetadataResolver
-
- All Implemented Interfaces:
org.pac4j.saml.metadata.SAML2MetadataResolver
public class ExtendedSAML2IdentityProviderMetadataResolver extends Object implements org.pac4j.saml.metadata.SAML2MetadataResolver
Extension of the defaultSAML2IdentityProviderMetadataResolver
to include additional caching of URL metadata resource.- Since:
- 8.0.0
- Author:
- XIMA Media GmbH
-
-
Constructor Summary
Constructors Constructor Description ExtendedSAML2IdentityProviderMetadataResolver(org.pac4j.saml.config.SAML2Configuration configuration, int cacheDurationHours)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.opensaml.saml.metadata.resolver.MetadataResolver
buildMetadataResolver()
protected String
determineIdentityProviderEntityId()
If no idpEntityId declared, select first EntityDescriptor entityId as our IDP.org.opensaml.core.xml.XMLObject
getEntityDescriptorElement()
String
getEntityId()
long
getLastModified()
String
getMetadata()
protected InputStream
getMetadataResourceInputStream()
void
init()
protected org.opensaml.saml.metadata.resolver.impl.DOMMetadataResolver
initializeMetadataResolver()
protected void
prepareMetadataRemoteConnection(URLConnection connection)
org.opensaml.saml.metadata.resolver.MetadataResolver
resolve(boolean force)
void
setHostnameVerifier(HostnameVerifier hostnameVerifier)
void
setProxy(Proxy proxy)
void
setSslSocketFactory(SSLSocketFactory sslSocketFactory)
-
-
-
Method Detail
-
init
public void init()
-
resolve
public final org.opensaml.saml.metadata.resolver.MetadataResolver resolve(boolean force)
- Specified by:
resolve
in interfaceorg.pac4j.saml.metadata.SAML2MetadataResolver
-
buildMetadataResolver
protected org.opensaml.saml.metadata.resolver.MetadataResolver buildMetadataResolver()
-
getLastModified
public long getLastModified()
-
determineIdentityProviderEntityId
protected String determineIdentityProviderEntityId()
If no idpEntityId declared, select first EntityDescriptor entityId as our IDP.- Returns:
- entity id of the idp
-
initializeMetadataResolver
protected org.opensaml.saml.metadata.resolver.impl.DOMMetadataResolver initializeMetadataResolver()
-
getMetadataResourceInputStream
protected InputStream getMetadataResourceInputStream() throws IOException
- Throws:
IOException
-
prepareMetadataRemoteConnection
protected void prepareMetadataRemoteConnection(URLConnection connection)
-
getEntityId
public String getEntityId()
- Specified by:
getEntityId
in interfaceorg.pac4j.saml.metadata.SAML2MetadataResolver
-
getMetadata
public String getMetadata()
- Specified by:
getMetadata
in interfaceorg.pac4j.saml.metadata.SAML2MetadataResolver
-
getEntityDescriptorElement
public final org.opensaml.core.xml.XMLObject getEntityDescriptorElement()
- Specified by:
getEntityDescriptorElement
in interfaceorg.pac4j.saml.metadata.SAML2MetadataResolver
-
setProxy
public void setProxy(Proxy proxy)
-
setHostnameVerifier
public void setHostnameVerifier(HostnameVerifier hostnameVerifier)
-
setSslSocketFactory
public void setSslSocketFactory(SSLSocketFactory sslSocketFactory)
-
-