Package org.pac4j.saml.metadata
Class BaseSAML2MetadataGenerator
- java.lang.Object
-
- org.pac4j.saml.metadata.BaseSAML2MetadataGenerator
-
- All Implemented Interfaces:
SAML2MetadataGenerator
- Direct Known Subclasses:
SAML2FileSystemMetadataGenerator,SAML2HttpUrlMetadataGenerator
public abstract class BaseSAML2MetadataGenerator extends java.lang.Object implements SAML2MetadataGenerator
Generates metadata object with standard values and overridden user defined values.- Since:
- 4.0.1
- Author:
- Misagh Moayyed
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.StringassertionConsumerServiceUrlprotected booleanauthnRequestSignedprotected java.util.List<java.lang.String>blackListedSignatureSigningAlgorithmsprotected org.opensaml.core.xml.XMLObjectBuilderFactorybuilderFactoryprotected CredentialProvidercredentialProviderprotected intdefaultACSIndexprotected org.opensaml.xmlsec.SignatureSigningConfigurationdefaultSignatureSigningConfigurationprotected java.lang.StringentityIdprotected org.opensaml.xmlsec.algorithm.AlgorithmRegistryglobalAlgorithmRegistryprotected static org.slf4j.Loggerloggerprotected org.opensaml.core.xml.io.MarshallerFactorymarshallerFactoryprotected java.lang.StringnameIdPolicyFormatprotected java.util.List<SAML2ServiceProviderRequestedAttribute>requestedAttributesprotected java.lang.StringrequestInitiatorLocationprotected java.lang.StringresponseBindingTypeprotected java.util.List<java.lang.String>signatureAlgorithmsprotected java.util.List<java.lang.String>signatureReferenceDigestMethodsprotected booleansignMetadataprotected java.lang.StringsingleLogoutServiceUrlprotected booleanwantAssertionSigned
-
Constructor Summary
Constructors Constructor Description BaseSAML2MetadataGenerator()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description org.opensaml.saml.saml2.metadata.EntityDescriptorbuildEntityDescriptor()org.opensaml.saml.metadata.resolver.MetadataResolverbuildMetadataResolver(org.springframework.core.io.Resource metadataResource)protected java.util.Collection<org.opensaml.saml.saml2.metadata.NameIDFormat>buildNameIDFormat()protected org.opensaml.saml.saml2.metadata.SPSSODescriptorbuildSPSSODescriptor()protected abstract org.opensaml.saml.metadata.resolver.impl.AbstractBatchMetadataResolvercreateMetadataResolver(org.springframework.core.io.Resource metadataResource)protected org.opensaml.saml.saml2.metadata.ExtensionsgenerateMetadataExtensions()protected org.opensaml.saml.saml2.metadata.AssertionConsumerServicegetAssertionConsumerService(java.lang.String binding, int index, boolean isDefault)java.util.List<java.lang.String>getBlackListedSignatureSigningAlgorithms()java.util.List<SAML2MetadataContactPerson>getContactPersons()CredentialProvidergetCredentialProvider()intgetDefaultACSIndex()java.lang.StringgetEntityId()protected org.opensaml.saml.saml2.metadata.KeyDescriptorgetKeyDescriptor(org.opensaml.security.credential.UsageType type, org.opensaml.xmlsec.signature.KeyInfo key)java.lang.StringgetMetadata(org.opensaml.saml.saml2.metadata.EntityDescriptor entityDescriptor)SAML2MetadataSignergetMetadataSigner()java.util.List<SAML2MetadataUIInfo>getMetadataUIInfos()java.lang.StringgetNameIdPolicyFormat()java.util.List<SAML2ServiceProviderRequestedAttribute>getRequestedAttributes()java.util.List<java.lang.String>getSignatureAlgorithms()java.util.List<java.lang.String>getSignatureReferenceDigestMethods()protected org.opensaml.saml.saml2.metadata.SingleLogoutServicegetSingleLogoutService(java.lang.String binding)java.util.List<java.lang.String>getSupportedProtocols()booleanisAuthnRequestSigned()booleanisSignMetadata()booleanisWantAssertionSigned()voidsetAssertionConsumerServiceUrl(java.lang.String assertionConsumerServiceUrl)voidsetAuthnRequestSigned(boolean authnRequestSigned)voidsetBlackListedSignatureSigningAlgorithms(java.util.List<java.lang.String> blackListedSignatureSigningAlgorithms)voidsetContactPersons(java.util.List<SAML2MetadataContactPerson> contactPersons)voidsetCredentialProvider(CredentialProvider credentialProvider)voidsetDefaultACSIndex(int defaultACSIndex)voidsetEntityId(java.lang.String entityId)voidsetMetadataSigner(SAML2MetadataSigner metadataSigner)voidsetMetadataUIInfos(java.util.List<SAML2MetadataUIInfo> metadataUIInfos)voidsetNameIdPolicyFormat(java.lang.String nameIdPolicyFormat)voidsetRequestedAttributes(java.util.List<SAML2ServiceProviderRequestedAttribute> requestedAttributes)voidsetRequestInitiatorLocation(java.lang.String requestInitiatorLocation)voidsetResponseBindingType(java.lang.String responseBindingType)voidsetSignatureAlgorithms(java.util.List<java.lang.String> signatureAlgorithms)voidsetSignatureReferenceDigestMethods(java.util.List<java.lang.String> signatureReferenceDigestMethods)voidsetSignMetadata(boolean signMetadata)voidsetSingleLogoutServiceUrl(java.lang.String singleLogoutServiceUrl)voidsetSupportedProtocols(java.util.List<java.lang.String> supportedProtocols)voidsetWantAssertionSigned(boolean wantAssertionSigned)protected voidsignMetadata(org.opensaml.saml.saml2.metadata.EntityDescriptor descriptor)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.pac4j.saml.metadata.SAML2MetadataGenerator
storeMetadata
-
-
-
-
Field Detail
-
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 java.lang.String entityId
-
assertionConsumerServiceUrl
protected java.lang.String assertionConsumerServiceUrl
-
responseBindingType
protected java.lang.String responseBindingType
-
singleLogoutServiceUrl
protected java.lang.String singleLogoutServiceUrl
-
authnRequestSigned
protected boolean authnRequestSigned
-
wantAssertionSigned
protected boolean wantAssertionSigned
-
signMetadata
protected boolean signMetadata
-
defaultACSIndex
protected int defaultACSIndex
-
requestInitiatorLocation
protected java.lang.String requestInitiatorLocation
-
nameIdPolicyFormat
protected java.lang.String nameIdPolicyFormat
-
requestedAttributes
protected java.util.List<SAML2ServiceProviderRequestedAttribute> requestedAttributes
-
defaultSignatureSigningConfiguration
protected org.opensaml.xmlsec.SignatureSigningConfiguration defaultSignatureSigningConfiguration
-
blackListedSignatureSigningAlgorithms
protected java.util.List<java.lang.String> blackListedSignatureSigningAlgorithms
-
signatureAlgorithms
protected java.util.List<java.lang.String> signatureAlgorithms
-
signatureReferenceDigestMethods
protected java.util.List<java.lang.String> signatureReferenceDigestMethods
-
-
Method Detail
-
buildMetadataResolver
public org.opensaml.saml.metadata.resolver.MetadataResolver buildMetadataResolver(org.springframework.core.io.Resource metadataResource) throws java.lang.Exception- Specified by:
buildMetadataResolverin interfaceSAML2MetadataGenerator- Throws:
java.lang.Exception
-
createMetadataResolver
protected abstract org.opensaml.saml.metadata.resolver.impl.AbstractBatchMetadataResolver createMetadataResolver(org.springframework.core.io.Resource metadataResource) throws java.lang.Exception- Throws:
java.lang.Exception
-
getMetadata
public java.lang.String getMetadata(org.opensaml.saml.saml2.metadata.EntityDescriptor entityDescriptor) throws java.lang.Exception- Specified by:
getMetadatain interfaceSAML2MetadataGenerator- Throws:
java.lang.Exception
-
buildEntityDescriptor
public org.opensaml.saml.saml2.metadata.EntityDescriptor buildEntityDescriptor()
- Specified by:
buildEntityDescriptorin interfaceSAML2MetadataGenerator
-
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 java.util.Collection<org.opensaml.saml.saml2.metadata.NameIDFormat> buildNameIDFormat()
-
getAssertionConsumerService
protected org.opensaml.saml.saml2.metadata.AssertionConsumerService getAssertionConsumerService(java.lang.String binding, int index, boolean isDefault)
-
getSingleLogoutService
protected org.opensaml.saml.saml2.metadata.SingleLogoutService getSingleLogoutService(java.lang.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 java.lang.String getEntityId()
-
setEntityId
public final void setEntityId(java.lang.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(java.lang.String assertionConsumerServiceUrl)
-
setResponseBindingType
public void setResponseBindingType(java.lang.String responseBindingType)
-
setSingleLogoutServiceUrl
public final void setSingleLogoutServiceUrl(java.lang.String singleLogoutServiceUrl)
-
setRequestInitiatorLocation
public final void setRequestInitiatorLocation(java.lang.String requestInitiatorLocation)
-
getNameIdPolicyFormat
public java.lang.String getNameIdPolicyFormat()
-
setNameIdPolicyFormat
public void setNameIdPolicyFormat(java.lang.String nameIdPolicyFormat)
-
getRequestedAttributes
public java.util.List<SAML2ServiceProviderRequestedAttribute> getRequestedAttributes()
-
setRequestedAttributes
public void setRequestedAttributes(java.util.List<SAML2ServiceProviderRequestedAttribute> requestedAttributes)
-
getBlackListedSignatureSigningAlgorithms
public java.util.List<java.lang.String> getBlackListedSignatureSigningAlgorithms()
-
setBlackListedSignatureSigningAlgorithms
public void setBlackListedSignatureSigningAlgorithms(java.util.List<java.lang.String> blackListedSignatureSigningAlgorithms)
-
getSignatureAlgorithms
public java.util.List<java.lang.String> getSignatureAlgorithms()
-
setSignatureAlgorithms
public void setSignatureAlgorithms(java.util.List<java.lang.String> signatureAlgorithms)
-
getSignatureReferenceDigestMethods
public java.util.List<java.lang.String> getSignatureReferenceDigestMethods()
-
setSignatureReferenceDigestMethods
public void setSignatureReferenceDigestMethods(java.util.List<java.lang.String> signatureReferenceDigestMethods)
-
getSupportedProtocols
public java.util.List<java.lang.String> getSupportedProtocols()
-
setSupportedProtocols
public void setSupportedProtocols(java.util.List<java.lang.String> supportedProtocols)
-
getContactPersons
public java.util.List<SAML2MetadataContactPerson> getContactPersons()
-
setContactPersons
public void setContactPersons(java.util.List<SAML2MetadataContactPerson> contactPersons)
-
getMetadataUIInfos
public java.util.List<SAML2MetadataUIInfo> getMetadataUIInfos()
-
setMetadataUIInfos
public void setMetadataUIInfos(java.util.List<SAML2MetadataUIInfo> metadataUIInfos)
-
getMetadataSigner
public SAML2MetadataSigner getMetadataSigner()
-
setMetadataSigner
public void setMetadataSigner(SAML2MetadataSigner metadataSigner)
-
-