Package org.pac4j.saml.metadata
Class BaseSAML2MetadataGenerator
java.lang.Object
org.pac4j.saml.metadata.BaseSAML2MetadataGenerator
- All Implemented Interfaces:
SAML2MetadataGenerator
- Direct Known Subclasses:
SAML2FileSystemMetadataGenerator,SAML2HttpUrlMetadataGenerator,SAML2JdbcMetadataGenerator,SAML2MongoMetadataGenerator,SAML2S3MetadataGenerator
Generates metadata object with standard values and overridden user defined values.
- Since:
- 4.0.1
- Author:
- Misagh Moayyed
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Stringprotected booleanprotected final org.opensaml.core.xml.XMLObjectBuilderFactoryprotected CredentialProviderprotected intprotected org.opensaml.xmlsec.SignatureSigningConfigurationprotected Stringprotected final org.opensaml.xmlsec.algorithm.AlgorithmRegistryprotected final org.slf4j.Loggerprotected final org.opensaml.core.xml.io.MarshallerFactoryprotected Stringprotected List<SAML2ServiceProviderRequestedAttribute>protected Stringprotected Stringprotected booleanprotected Stringprotected boolean -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.opensaml.saml.saml2.metadata.EntityDescriptorbuildEntityDescriptor.org.opensaml.saml.metadata.resolver.MetadataResolverbuildMetadataResolver.protected Collection<org.opensaml.saml.saml2.metadata.NameIDFormat>buildNameIDFormat.protected org.opensaml.saml.saml2.metadata.SPSSODescriptorbuildSPSSODescriptor.protected abstract org.opensaml.saml.metadata.resolver.impl.AbstractMetadataResolvercreateMetadataResolver.protected org.opensaml.saml.saml2.metadata.ExtensionsgenerateMetadataExtensions.protected org.opensaml.saml.saml2.metadata.AssertionConsumerServicegetAssertionConsumerService(String binding, int index, boolean isDefault) getAssertionConsumerService.Getter for the fieldblackListedSignatureSigningAlgorithms.protected org.opensaml.saml.saml2.metadata.KeyDescriptorgetKeyDescriptor(org.opensaml.security.credential.UsageType type, org.opensaml.xmlsec.signature.KeyInfo key) getKeyDescriptor.getMetadata(org.opensaml.saml.saml2.metadata.EntityDescriptor entityDescriptor) getMetadata.Getter for the fieldsignatureAlgorithms.Getter for the fieldsignatureReferenceDigestMethods.protected org.opensaml.saml.saml2.metadata.SingleLogoutServicegetSingleLogoutService(String binding) getSingleLogoutService.protected voidsignMetadata(org.opensaml.xmlsec.signature.SignableXMLObject descriptor) signMetadata.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.pac4j.saml.metadata.SAML2MetadataGenerator
storeMetadata
-
Field Details
-
logger
protected 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
-
entityId
-
assertionConsumerServiceUrl
-
responseBindingType
-
singleLogoutServiceUrl
-
authnRequestSigned
protected boolean authnRequestSigned -
wantAssertionSigned
protected boolean wantAssertionSigned -
signMetadata
protected boolean signMetadata -
defaultACSIndex
protected int defaultACSIndex -
requestInitiatorLocation
-
nameIdPolicyFormat
-
requestedAttributes
-
defaultSignatureSigningConfiguration
protected org.opensaml.xmlsec.SignatureSigningConfiguration defaultSignatureSigningConfiguration -
blackListedSignatureSigningAlgorithms
-
signatureAlgorithms
-
signatureReferenceDigestMethods
-
-
Constructor Details
-
BaseSAML2MetadataGenerator
public BaseSAML2MetadataGenerator()
-
-
Method Details
-
buildMetadataResolver
public org.opensaml.saml.metadata.resolver.MetadataResolver buildMetadataResolver() throws ExceptionbuildMetadataResolver.
- Specified by:
buildMetadataResolverin interfaceSAML2MetadataGenerator- Returns:
- a
MetadataResolverobject - Throws:
Exception- if any.
-
createMetadataResolver
protected abstract org.opensaml.saml.metadata.resolver.impl.AbstractMetadataResolver createMetadataResolver() throws ExceptioncreateMetadataResolver.
- Returns:
- a
AbstractMetadataResolverobject - Throws:
Exception- if any.
-
getMetadata
public String getMetadata(org.opensaml.saml.saml2.metadata.EntityDescriptor entityDescriptor) throws Exception getMetadata.
- Specified by:
getMetadatain interfaceSAML2MetadataGenerator- Parameters:
entityDescriptor- aEntityDescriptorobject- Returns:
- a
Stringobject - Throws:
Exception- if any.
-
buildEntityDescriptor
public org.opensaml.saml.saml2.metadata.EntityDescriptor buildEntityDescriptor()buildEntityDescriptor.
- Specified by:
buildEntityDescriptorin interfaceSAML2MetadataGenerator- Returns:
- a
EntityDescriptorobject
-
signMetadata
protected void signMetadata(org.opensaml.xmlsec.signature.SignableXMLObject descriptor) signMetadata.
- Parameters:
descriptor- aEntityDescriptorobject
-
generateMetadataExtensions
protected org.opensaml.saml.saml2.metadata.Extensions generateMetadataExtensions()generateMetadataExtensions.
- Returns:
- a
Extensionsobject
-
buildSPSSODescriptor
protected org.opensaml.saml.saml2.metadata.SPSSODescriptor buildSPSSODescriptor()buildSPSSODescriptor.
- Returns:
- a
SPSSODescriptorobject
-
buildNameIDFormat
buildNameIDFormat.
- Returns:
- a
Collectionobject
-
getAssertionConsumerService
protected org.opensaml.saml.saml2.metadata.AssertionConsumerService getAssertionConsumerService(String binding, int index, boolean isDefault) getAssertionConsumerService.
- Parameters:
binding- aStringobjectindex- a intisDefault- a boolean- Returns:
- a
AssertionConsumerServiceobject
-
getSingleLogoutService
protected org.opensaml.saml.saml2.metadata.SingleLogoutService getSingleLogoutService(String binding) getSingleLogoutService.
- Parameters:
binding- aStringobject- Returns:
- a
SingleLogoutServiceobject
-
getKeyDescriptor
protected org.opensaml.saml.saml2.metadata.KeyDescriptor getKeyDescriptor(org.opensaml.security.credential.UsageType type, org.opensaml.xmlsec.signature.KeyInfo key) getKeyDescriptor.
- Parameters:
type- aUsageTypeobjectkey- aKeyInfoobject- Returns:
- a
KeyDescriptorobject
-
getBlackListedSignatureSigningAlgorithms
Getter for the field
blackListedSignatureSigningAlgorithms.- Returns:
- a
Listobject
-
getSignatureAlgorithms
Getter for the field
signatureAlgorithms.- Returns:
- a
Listobject
-
getSignatureReferenceDigestMethods
Getter for the field
signatureReferenceDigestMethods.- Returns:
- a
Listobject
-