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
Modifier and TypeClassDescriptionstatic final class
A builder forMetadataSettings
.static class
Configuration for ContactPerson metadata element.static enum
ContactPerson types.static class
Configuration for EncryptionMethod metadata elements.static class
Configuration for Organization metadata element.static class
Configuration for SigningMethod metadata elements.static class
Configuration 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
Modifier and TypeFieldDescriptionstatic final String
Tells how long the published IdP metadata can remain in a cache.static final Duration
Default cache duration.static final String
AMap
where the keys areMetadataSettings.ContactPersonType
and the valuesMetadataSettings.ContactPersonSettings
.static final String
Thealg:DigestMethod
elements that should be included in the metadata.static final String
Whetheralg:DigestMethod
elements should be placed in anExtensions
element under the role descriptor (i.e., theIDPSSODescriptor
).static final String
Themd:EncryptionMethod
elements that should be included under themd:KeyDescriptor
for the encryption key.static final String
TheOrganization
element.static final String
Attribute names that should be included under theRequestedPrincipalSelection
metadata extension.static final String
Thealg:SigningMethod
elements that should be included in the metadata.static final String
Whetheralg:SigningMethod
elements should be placed in anExtensions
element under the role descriptor (i.e., theIDPSSODescriptor
).static final String
A template for the IdP metadata.static final String
TheUIInfo
element.static final String
Tells for how long a published metadata entry should be valid.static final Duration
Default metadata validity. -
Constructor Summary
ModifierConstructorDescriptionprotected
MetadataSettings
(Map<String, Object> settings) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionstatic MetadataSettings.Builder
builder()
Constructs a newMetadataSettings.Builder
with no settings.Tells how long the published IdP metadata can remain in a cache.Gets aMap
where the keys areMetadataSettings.ContactPersonType
and the valuesMetadataSettings.ContactPersonSettings
.Gets thealg:DigestMethod
elements that should be included in the metadata.Tells whetheralg:DigestMethod
elements should be placed in anExtensions
element under the role descriptor (i.e., theIDPSSODescriptor
).Gets themd:EncryptionMethod
elements that should be included under themd:KeyDescriptor
for the encryption key.Gets theOrganization
element.Gets the attribute names that should be included under theRequestedPrincipalSelection
metadata extension.Gets thealg:SigningMethod
elements that should be included in the metadata.Tells whetheralg:SigningMethod
elements should be placed in anExtensions
element 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.Builder
withSettings
(Map<String, Object> settings) Constructs a newMetadataSettings.Builder
with 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:DigestMethod
elements that should be included in the metadata. AList
of strings.- See Also:
-
SAML_METADATA_DIGEST_METHODS_UNDER_ROLE
Whetheralg:DigestMethod
elements should be placed in anExtensions
element under the role descriptor (i.e., theIDPSSODescriptor
). Iffalse
, thealg:DigestMethod
elements are included as elements in theExtensions
element of theEntityDescriptor
. ABoolean
.- See Also:
-
SAML_METADATA_SIGNING_METHODS
Thealg:SigningMethod
elements that should be included in the metadata. AList
ofMetadataSettings.SigningMethodSettings
.- See Also:
-
SAML_METADATA_SIGNING_METHODS_UNDER_ROLE
Whetheralg:SigningMethod
elements should be placed in anExtensions
element under the role descriptor (i.e., theIDPSSODescriptor
). Iffalse
, thealg:SigningMethod
elements are included as elements in theExtensions
element of theEntityDescriptor
. ABoolean
.- See Also:
-
SAML_METADATA_ENCRYPTION_METHODS
Themd:EncryptionMethod
elements that should be included under themd:KeyDescriptor
for the encryption key. Note that these algorithms must match the configured encryption key.List
ofMetadataSettings.EncryptionMethodSettings
.- See Also:
-
SAML_METADATA_UI_INFO
TheUIInfo
element. AMetadataSettings.UIInfoSettings
.- See Also:
-
SAML_METADATA_REQUESTED_PRINCIPAL_SELECTION
Attribute names that should be included under theRequestedPrincipalSelection
metadata extension. AList
ofString
s.- See Also:
-
SAML_METADATA_ORGANIZATION
TheOrganization
element. AMetadataSettings.OrganizationSettings
.- See Also:
-
SAML_METADATA_CONTACT_PERSONS
AMap
where the keys areMetadataSettings.ContactPersonType
and 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
null
if 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:DigestMethod
elements that should be included in the metadata.- Returns:
- a list of algorithms
-
getDigestMethodsUnderRole
Tells whetheralg:DigestMethod
elements should be placed in anExtensions
element under the role descriptor (i.e., theIDPSSODescriptor
). Iffalse
, thealg:DigestMethod
elements are included as elements in theExtensions
element of theEntityDescriptor
.- Returns:
- where to place elements
-
getSigningMethods
Gets thealg:SigningMethod
elements that should be included in the metadata.- Returns:
- a list of signing methods
-
getSigningMethodsUnderRole
Tells whetheralg:SigningMethod
elements should be placed in anExtensions
element under the role descriptor (i.e., theIDPSSODescriptor
). Iffalse
, thealg:SigningMethod
elements are included as elements in theExtensions
element of theEntityDescriptor
.- Returns:
- where to place elements
-
getEncryptionMethods
Gets themd:EncryptionMethod
elements that should be included under themd:KeyDescriptor
for 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.UIInfoSettings
ornull
-
getRequestedPrincipalSelection
Gets the attribute names that should be included under theRequestedPrincipalSelection
metadata extension.- Returns:
- list of attribute names
-
getOrganization
Gets theOrganization
element.- Returns:
- a
MetadataSettings.OrganizationSettings
ornull
-
getContactPersons
public Map<MetadataSettings.ContactPersonType,MetadataSettings.ContactPersonSettings> getContactPersons()Gets aMap
where the keys areMetadataSettings.ContactPersonType
and the valuesMetadataSettings.ContactPersonSettings
.- Returns:
- a map of contact persons
-
builder
Constructs a newMetadataSettings.Builder
with no settings.- Returns:
- the
MetadataSettings.Builder
-
withSettings
Constructs a newMetadataSettings.Builder
with the provided settings.- Parameters:
settings
- the settings to initialize the builder- Returns:
- the builder
-