Class ExtendedSAML2IdentityProviderMetadataResolver

  • All Implemented Interfaces:
    org.pac4j.saml.metadata.SAML2MetadataResolver

    public class ExtendedSAML2IdentityProviderMetadataResolver
    extends Object
    implements org.pac4j.saml.metadata.SAML2MetadataResolver
    Extension of the default SAML2IdentityProviderMetadataResolver to include additional caching of URL metadata resource.
    Since:
    8.0.0
    Author:
    XIMA Media GmbH
    • Constructor Detail

      • ExtendedSAML2IdentityProviderMetadataResolver

        public ExtendedSAML2IdentityProviderMetadataResolver​(org.pac4j.saml.config.SAML2Configuration configuration,
                                                             int cacheDurationHours)
    • Method Detail

      • init

        public void init()
      • resolve

        public final org.opensaml.saml.metadata.resolver.MetadataResolver resolve​(boolean force)
        Specified by:
        resolve in interface org.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()
      • prepareMetadataRemoteConnection

        protected void prepareMetadataRemoteConnection​(URLConnection connection)
      • getEntityId

        public String getEntityId()
        Specified by:
        getEntityId in interface org.pac4j.saml.metadata.SAML2MetadataResolver
      • getMetadata

        public String getMetadata()
        Specified by:
        getMetadata in interface org.pac4j.saml.metadata.SAML2MetadataResolver
      • getEntityDescriptorElement

        public final org.opensaml.core.xml.XMLObject getEntityDescriptorElement()
        Specified by:
        getEntityDescriptorElement in interface org.pac4j.saml.metadata.SAML2MetadataResolver
      • setProxy

        public void setProxy​(Proxy proxy)
      • setHostnameVerifier

        public void setHostnameVerifier​(HostnameVerifier hostnameVerifier)
      • setSslSocketFactory

        public void setSslSocketFactory​(SSLSocketFactory sslSocketFactory)