Class BaseSAML2MetadataGenerator

java.lang.Object
org.pac4j.saml.metadata.BaseSAML2MetadataGenerator
All Implemented Interfaces:
SAML2MetadataGenerator
Direct Known Subclasses:
SAML2FileSystemMetadataGenerator, SAML2HttpUrlMetadataGenerator, SAML2JdbcMetadataGenerator, SAML2MongoMetadataGenerator

public abstract class BaseSAML2MetadataGenerator extends Object implements SAML2MetadataGenerator
Generates metadata object with standard values and overridden user defined values.
Since:
4.0.1
Author:
Misagh Moayyed
  • Field Details

    • logger

      protected static final org.slf4j.Logger logger
    • builderFactory

      protected final org.opensaml.core.xml.XMLObjectBuilderFactory builderFactory
    • marshallerFactory

      protected final org.opensaml.core.xml.io.MarshallerFactory marshallerFactory
    • globalAlgorithmRegistry

      protected final org.opensaml.xmlsec.algorithm.AlgorithmRegistry globalAlgorithmRegistry
    • credentialProvider

      protected CredentialProvider credentialProvider
    • entityId

      protected String entityId
    • assertionConsumerServiceUrl

      protected String assertionConsumerServiceUrl
    • responseBindingType

      protected String responseBindingType
    • singleLogoutServiceUrl

      protected String singleLogoutServiceUrl
    • authnRequestSigned

      protected boolean authnRequestSigned
    • wantAssertionSigned

      protected boolean wantAssertionSigned
    • signMetadata

      protected boolean signMetadata
    • defaultACSIndex

      protected int defaultACSIndex
    • requestInitiatorLocation

      protected String requestInitiatorLocation
    • nameIdPolicyFormat

      protected String nameIdPolicyFormat
    • requestedAttributes

      protected List<SAML2ServiceProviderRequestedAttribute> requestedAttributes
    • defaultSignatureSigningConfiguration

      protected org.opensaml.xmlsec.SignatureSigningConfiguration defaultSignatureSigningConfiguration
    • blackListedSignatureSigningAlgorithms

      protected List<String> blackListedSignatureSigningAlgorithms
    • signatureAlgorithms

      protected List<String> signatureAlgorithms
    • signatureReferenceDigestMethods

      protected List<String> signatureReferenceDigestMethods
  • Constructor Details

    • BaseSAML2MetadataGenerator

      public BaseSAML2MetadataGenerator()
  • Method Details

    • buildMetadataResolver

      public org.opensaml.saml.metadata.resolver.MetadataResolver buildMetadataResolver() throws Exception
      Specified by:
      buildMetadataResolver in interface SAML2MetadataGenerator
      Throws:
      Exception
    • createMetadataResolver

      protected abstract org.opensaml.saml.metadata.resolver.impl.AbstractMetadataResolver createMetadataResolver() throws Exception
      Throws:
      Exception
    • getMetadata

      public String getMetadata(org.opensaml.saml.saml2.metadata.EntityDescriptor entityDescriptor) throws Exception
      Specified by:
      getMetadata in interface SAML2MetadataGenerator
      Throws:
      Exception
    • buildEntityDescriptor

      public org.opensaml.saml.saml2.metadata.EntityDescriptor buildEntityDescriptor()
      Specified by:
      buildEntityDescriptor in interface SAML2MetadataGenerator
    • signMetadata

      protected void signMetadata(org.opensaml.saml.saml2.metadata.EntityDescriptor descriptor)
    • generateMetadataExtensions

      protected org.opensaml.saml.saml2.metadata.Extensions generateMetadataExtensions()
    • buildSPSSODescriptor

      protected org.opensaml.saml.saml2.metadata.SPSSODescriptor buildSPSSODescriptor()
    • buildNameIDFormat

      protected Collection<org.opensaml.saml.saml2.metadata.NameIDFormat> buildNameIDFormat()
    • getAssertionConsumerService

      protected org.opensaml.saml.saml2.metadata.AssertionConsumerService getAssertionConsumerService(String binding, int index, boolean isDefault)
    • getSingleLogoutService

      protected org.opensaml.saml.saml2.metadata.SingleLogoutService getSingleLogoutService(String binding)
    • getKeyDescriptor

      protected org.opensaml.saml.saml2.metadata.KeyDescriptor getKeyDescriptor(org.opensaml.security.credential.UsageType type, org.opensaml.xmlsec.signature.KeyInfo key)
    • getCredentialProvider

      public CredentialProvider getCredentialProvider()
    • setCredentialProvider

      public final void setCredentialProvider(CredentialProvider credentialProvider)
    • getEntityId

      public String getEntityId()
    • setEntityId

      public final void setEntityId(String entityId)
    • isAuthnRequestSigned

      public boolean isAuthnRequestSigned()
    • setAuthnRequestSigned

      public final void setAuthnRequestSigned(boolean authnRequestSigned)
    • isWantAssertionSigned

      public boolean isWantAssertionSigned()
    • setWantAssertionSigned

      public void setWantAssertionSigned(boolean wantAssertionSigned)
    • isSignMetadata

      public boolean isSignMetadata()
    • setSignMetadata

      public void setSignMetadata(boolean signMetadata)
    • getDefaultACSIndex

      public int getDefaultACSIndex()
    • setDefaultACSIndex

      public void setDefaultACSIndex(int defaultACSIndex)
    • setAssertionConsumerServiceUrl

      public final void setAssertionConsumerServiceUrl(String assertionConsumerServiceUrl)
    • setResponseBindingType

      public void setResponseBindingType(String responseBindingType)
    • setSingleLogoutServiceUrl

      public final void setSingleLogoutServiceUrl(String singleLogoutServiceUrl)
    • setRequestInitiatorLocation

      public final void setRequestInitiatorLocation(String requestInitiatorLocation)
    • getNameIdPolicyFormat

      public String getNameIdPolicyFormat()
    • setNameIdPolicyFormat

      public void setNameIdPolicyFormat(String nameIdPolicyFormat)
    • getRequestedAttributes

      public List<SAML2ServiceProviderRequestedAttribute> getRequestedAttributes()
    • setRequestedAttributes

      public void setRequestedAttributes(List<SAML2ServiceProviderRequestedAttribute> requestedAttributes)
    • getBlackListedSignatureSigningAlgorithms

      public List<String> getBlackListedSignatureSigningAlgorithms()
    • setBlackListedSignatureSigningAlgorithms

      public void setBlackListedSignatureSigningAlgorithms(List<String> blackListedSignatureSigningAlgorithms)
    • getSignatureAlgorithms

      public List<String> getSignatureAlgorithms()
    • setSignatureAlgorithms

      public void setSignatureAlgorithms(List<String> signatureAlgorithms)
    • getSignatureReferenceDigestMethods

      public List<String> getSignatureReferenceDigestMethods()
    • setSignatureReferenceDigestMethods

      public void setSignatureReferenceDigestMethods(List<String> signatureReferenceDigestMethods)
    • getSupportedProtocols

      public List<String> getSupportedProtocols()
    • setSupportedProtocols

      public void setSupportedProtocols(List<String> supportedProtocols)
    • getContactPersons

      public List<SAML2MetadataContactPerson> getContactPersons()
    • setContactPersons

      public void setContactPersons(List<SAML2MetadataContactPerson> contactPersons)
    • getMetadataUIInfos

      public List<SAML2MetadataUIInfo> getMetadataUIInfos()
    • setMetadataUIInfos

      public void setMetadataUIInfos(List<SAML2MetadataUIInfo> metadataUIInfos)
    • getMetadataSigner

      public SAML2MetadataSigner getMetadataSigner()
    • setMetadataSigner

      public void setMetadataSigner(SAML2MetadataSigner metadataSigner)