Class IdentityProviderSettings.Builder
java.lang.Object
se.swedenconnect.spring.saml.idp.settings.AbstractSettings.AbstractBuilder<IdentityProviderSettings,IdentityProviderSettings.Builder>
se.swedenconnect.spring.saml.idp.settings.IdentityProviderSettings.Builder
- Enclosing class:
IdentityProviderSettings
public static final class IdentityProviderSettings.Builder
extends AbstractSettings.AbstractBuilder<IdentityProviderSettings,IdentityProviderSettings.Builder>
A builder for
IdentityProviderSettings
.-
Method Summary
Modifier and TypeMethodDescriptionprotected void
Is invoked byAbstractSettings.AbstractBuilder.build()
to apply default values to those settings that are mandatory and has not been assigned.assertionSettings
(AssertionSettings assertionSettings) Assigns the Identity Provider Assertion settings.Assigns the Identity Provider base URL, i.e., the protocol, domain and context path.Builds theIdentityProviderSettings
.clockSkewAdjustment
(Duration clockSkewAdjustment) Assigns the clock skew adjustment (in both directions) to consider still acceptable messages.credentials
(CredentialSettings credentials) Assigns the Identity Provider credentials.endpoints
(EndpointSettings endpoints) Assigns the IdP endpoints.Assigns the SAML entityID of the Identity Provider.hokBaseUrl
(String hokBaseUrl) Assigns the Identity Provider base URL for Holder-of-key support, i.e., the protocol, domain and context path.maxMessageAge
(Duration maxMessageAge) Assigns the maximum allowed age of received messages.metadata
(MetadataSettings metadata) Assigns the IdP metadata settings.metadataProvider
(org.opensaml.saml.metadata.resolver.MetadataResolver metadataProvider) Assigns the Identity Provider metadata provider (resolver).metadataProviderConfiguration
(MetadataProviderSettings... metadataProviders) Assigns the IdP metadata provider configuration settings.requiresSignedRequests
(Boolean requiresSignedRequests) Assigns whether the IdP requires signed authentication requests.ssoDurationLimit
(Duration ssoDurationLimit) Assigns for how long may this authentication be re-used.supportsUserMessage
(Boolean supportsUserMessage) Assigns whether the IdP supports theUserMessage
extension.Methods inherited from class se.swedenconnect.spring.saml.idp.settings.AbstractSettings.AbstractBuilder
build, getSettings, getThis, setting, settings
-
Method Details
-
entityId
Assigns the SAML entityID of the Identity Provider.- Parameters:
entityId
- the entityID- Returns:
- the builder
-
baseUrl
Assigns the Identity Provider base URL, i.e., the protocol, domain and context path. Must not end with an '/'.- Parameters:
baseUrl
- the IdP base URL- Returns:
- the builder
-
hokBaseUrl
Assigns the Identity Provider base URL for Holder-of-key support, i.e., the protocol, domain and context path. Must not end with an '/'.This setting is optional, and if HoK is being used and that requires a different IdP domain or context path this setting represents this base URL.
- Parameters:
hokBaseUrl
- the HoK base URL- Returns:
- the builder
-
requiresSignedRequests
Assigns whether the IdP requires signed authentication requests.- Parameters:
requiresSignedRequests
- whether the IdP requires signed authentication requests- Returns:
- the builder
-
clockSkewAdjustment
Assigns the clock skew adjustment (in both directions) to consider still acceptable messages.- Parameters:
clockSkewAdjustment
- aDuration
- Returns:
- the builder
-
maxMessageAge
Assigns the maximum allowed age of received messages.- Parameters:
maxMessageAge
- aDuration
- Returns:
- the builder
-
ssoDurationLimit
Assigns for how long may this authentication be re-used.- Parameters:
ssoDurationLimit
- aDuration
- Returns:
- the builder
-
supportsUserMessage
Assigns whether the IdP supports theUserMessage
extension.- Parameters:
supportsUserMessage
- whether theUserMessage
extension is supported- Returns:
- the builder
-
credentials
Assigns the Identity Provider credentials.- Parameters:
credentials
- the credentials- Returns:
- the builder
-
endpoints
Assigns the IdP endpoints.- Parameters:
endpoints
- the endpoints- Returns:
- the builder
-
assertionSettings
Assigns the Identity Provider Assertion settings.- Parameters:
assertionSettings
- the Identity Provider Assertion settings- Returns:
- the builder
-
metadata
Assigns the IdP metadata settings.- Parameters:
metadata
- the IdP metadata settings- Returns:
- the builder
-
metadataProvider
public IdentityProviderSettings.Builder metadataProvider(org.opensaml.saml.metadata.resolver.MetadataResolver metadataProvider) Assigns the Identity Provider metadata provider (resolver).A metadata provider may also be set up using
metadataProviderConfiguration(MetadataProviderSettings...)
.- Parameters:
metadataProvider
- the metadata resolver to use- Returns:
- the builder
- See Also:
-
metadataProviderConfiguration
public IdentityProviderSettings.Builder metadataProviderConfiguration(MetadataProviderSettings... metadataProviders) Assigns the IdP metadata provider configuration settings.A metadata provider may also be set up using
metadataProvider(MetadataResolver)
.- Parameters:
metadataProviders
- an array of metadata provider configuration settings- Returns:
- the builder
- See Also:
-
buildObject
Builds theIdentityProviderSettings
.- Specified by:
buildObject
in classAbstractSettings.AbstractBuilder<IdentityProviderSettings,
IdentityProviderSettings.Builder> - Returns:
- the
IdentityProviderSettings
-
applyDefaultSettings
protected void applyDefaultSettings()Is invoked byAbstractSettings.AbstractBuilder.build()
to apply default values to those settings that are mandatory and has not been assigned.- Specified by:
applyDefaultSettings
in classAbstractSettings.AbstractBuilder<IdentityProviderSettings,
IdentityProviderSettings.Builder>
-