Class MetadataSettings
java.lang.Object
se.swedenconnect.spring.saml.idp.settings.AbstractSettings
se.swedenconnect.spring.saml.idp.settings.MetadataSettings
- All Implemented Interfaces:
Serializable
Settings for the IdP metadata.
- Author:
- Martin Lindström
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA builder forMetadataSettings.static classConfiguration for ContactPerson metadata element.static enumContactPerson types.static classConfiguration for EncryptionMethod metadata elements.static classConfiguration for Organization metadata element.static classConfiguration for SigningMethod metadata elements.static classConfiguration for UIInfo metadata element.Nested classes/interfaces inherited from class se.swedenconnect.spring.saml.idp.settings.AbstractSettings
AbstractSettings.AbstractBuilder<T extends AbstractSettings,B extends AbstractSettings.AbstractBuilder<T, B>> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringTells how long the published IdP metadata can remain in a cache.static final DurationDefault cache duration.static final StringAMapwhere the keys areMetadataSettings.ContactPersonTypeand the valuesMetadataSettings.ContactPersonSettings.static final StringThealg:DigestMethodelements that should be included in the metadata.static final StringWhetheralg:DigestMethodelements should be placed in anExtensionselement under the role descriptor (i.e., theIDPSSODescriptor).static final StringThemd:EncryptionMethodelements that should be included under themd:KeyDescriptorfor the encryption key.static final StringTheOrganizationelement.static final StringAttribute names that should be included under theRequestedPrincipalSelectionmetadata extension.static final StringThealg:SigningMethodelements that should be included in the metadata.static final StringWhetheralg:SigningMethodelements should be placed in anExtensionselement under the role descriptor (i.e., theIDPSSODescriptor).static final StringA template for the IdP metadata.static final StringTheUIInfoelement.static final StringTells for how long a published metadata entry should be valid.static final DurationDefault metadata validity. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedMetadataSettings(Map<String, Object> settings) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionstatic MetadataSettings.Builderbuilder()Constructs a newMetadataSettings.Builderwith no settings.Tells how long the published IdP metadata can remain in a cache.Gets aMapwhere the keys areMetadataSettings.ContactPersonTypeand the valuesMetadataSettings.ContactPersonSettings.Gets thealg:DigestMethodelements that should be included in the metadata.Tells whetheralg:DigestMethodelements should be placed in anExtensionselement under the role descriptor (i.e., theIDPSSODescriptor).Gets themd:EncryptionMethodelements that should be included under themd:KeyDescriptorfor the encryption key.Gets theOrganizationelement.Gets the attribute names that should be included under theRequestedPrincipalSelectionmetadata extension.Gets thealg:SigningMethodelements that should be included in the metadata.Tells whetheralg:SigningMethodelements should be placed in anExtensionselement under the role descriptor (i.e., theIDPSSODescriptor).Gets the template for the IdP metadata.Gets theMetadataSettings.UIInfoSettings.Tells for how long a published metadata entry should be valid.static MetadataSettings.BuilderwithSettings(Map<String, Object> settings) Constructs a newMetadataSettings.Builderwith the provided settings.Methods inherited from class se.swedenconnect.spring.saml.idp.settings.AbstractSettings
equals, getSetting, getSettings, hashCode, toString
-
Field Details
-
SAML_METADATA_TEMPLATE
A template for the IdP metadata. AResource.- See Also:
-
SAML_METADATA_CACHE_DURATION_DEFAULT
Default cache duration. -
SAML_METADATA_CACHE_DURATION
Tells how long the published IdP metadata can remain in a cache. ADuration.- See Also:
-
SAML_METADATA_VALIDITY_DEFAULT
Default metadata validity. -
SAML_METADATA_VALIDITY
Tells for how long a published metadata entry should be valid. ADuration.- See Also:
-
SAML_METADATA_DIGEST_METHODS
Thealg:DigestMethodelements that should be included in the metadata. AListof strings.- See Also:
-
SAML_METADATA_DIGEST_METHODS_UNDER_ROLE
Whetheralg:DigestMethodelements should be placed in anExtensionselement under the role descriptor (i.e., theIDPSSODescriptor). Iffalse, thealg:DigestMethodelements are included as elements in theExtensionselement of theEntityDescriptor. ABoolean.- See Also:
-
SAML_METADATA_SIGNING_METHODS
Thealg:SigningMethodelements that should be included in the metadata. AListofMetadataSettings.SigningMethodSettings.- See Also:
-
SAML_METADATA_SIGNING_METHODS_UNDER_ROLE
Whetheralg:SigningMethodelements should be placed in anExtensionselement under the role descriptor (i.e., theIDPSSODescriptor). Iffalse, thealg:SigningMethodelements are included as elements in theExtensionselement of theEntityDescriptor. ABoolean.- See Also:
-
SAML_METADATA_ENCRYPTION_METHODS
Themd:EncryptionMethodelements that should be included under themd:KeyDescriptorfor the encryption key. Note that these algorithms must match the configured encryption key.ListofMetadataSettings.EncryptionMethodSettings.- See Also:
-
SAML_METADATA_UI_INFO
TheUIInfoelement. AMetadataSettings.UIInfoSettings.- See Also:
-
SAML_METADATA_REQUESTED_PRINCIPAL_SELECTION
Attribute names that should be included under theRequestedPrincipalSelectionmetadata extension. AListofStrings.- See Also:
-
SAML_METADATA_ORGANIZATION
TheOrganizationelement. AMetadataSettings.OrganizationSettings.- See Also:
-
SAML_METADATA_CONTACT_PERSONS
AMapwhere the keys areMetadataSettings.ContactPersonTypeand the valuesMetadataSettings.ContactPersonSettings.- See Also:
-
-
Constructor Details
-
MetadataSettings
Constructor.- Parameters:
settings- the settings
-
-
Method Details
-
getTemplate
Gets the template for the IdP metadata.- Returns:
- the template or
nullif not assigned.
-
getCacheDuration
Tells how long the published IdP metadata can remain in a cache.- Returns:
- a
Duration
-
getValidityPeriod
Tells for how long a published metadata entry should be valid.- Returns:
- a
Duration
-
getDigestMethods
Gets thealg:DigestMethodelements that should be included in the metadata.- Returns:
- a list of algorithms
-
getDigestMethodsUnderRole
Tells whetheralg:DigestMethodelements should be placed in anExtensionselement under the role descriptor (i.e., theIDPSSODescriptor). Iffalse, thealg:DigestMethodelements are included as elements in theExtensionselement of theEntityDescriptor.- Returns:
- where to place elements
-
getSigningMethods
Gets thealg:SigningMethodelements that should be included in the metadata.- Returns:
- a list of signing methods
-
getSigningMethodsUnderRole
Tells whetheralg:SigningMethodelements should be placed in anExtensionselement under the role descriptor (i.e., theIDPSSODescriptor). Iffalse, thealg:SigningMethodelements are included as elements in theExtensionselement of theEntityDescriptor.- Returns:
- where to place elements
-
getEncryptionMethods
Gets themd:EncryptionMethodelements that should be included under themd:KeyDescriptorfor the encryption key. Note that these algorithms must match the configured encryption key.- Returns:
- a list of
MetadataSettings.EncryptionMethodSettings
-
getUiInfo
Gets theMetadataSettings.UIInfoSettings.- Returns:
MetadataSettings.UIInfoSettingsornull
-
getRequestedPrincipalSelection
Gets the attribute names that should be included under theRequestedPrincipalSelectionmetadata extension.- Returns:
- list of attribute names
-
getOrganization
Gets theOrganizationelement.- Returns:
- a
MetadataSettings.OrganizationSettingsornull
-
getContactPersons
public Map<MetadataSettings.ContactPersonType,MetadataSettings.ContactPersonSettings> getContactPersons()Gets aMapwhere the keys areMetadataSettings.ContactPersonTypeand the valuesMetadataSettings.ContactPersonSettings.- Returns:
- a map of contact persons
-
builder
Constructs a newMetadataSettings.Builderwith no settings.- Returns:
- the
MetadataSettings.Builder
-
withSettings
Constructs a newMetadataSettings.Builderwith the provided settings.- Parameters:
settings- the settings to initialize the builder- Returns:
- the builder
-