Class MetadataProviderSettings
java.lang.Object
se.swedenconnect.spring.saml.idp.settings.AbstractSettings
se.swedenconnect.spring.saml.idp.settings.MetadataProviderSettings
- All Implemented Interfaces:
Serializable
Settings for configuring SAML metadata providers (resolvers).
- Author:
- Martin Lindström
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA builder forMetadataProviderSettings.static classSettings for representing HTTP proxy configuration.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 StringIf thelocationsetting is a URL, a "backup location" may be assigned to store downloaded metadata.static final StringIf thelocationsetting is a URL and an HTTP proxy is required this setting configures this proxy.static final StringIf thelocationis an HTTPS resource, this setting may be used to specify a Spring SSL Bundle that gives theTrustManagers to use during TLS verification.static final StringThe location of the metadata.static final StringIf thelocationsetting is a URL, setting the MDQ-flag means that the metadata MDQ (https://www.ietf.org/id/draft-young-md-query-17.html) protocol is used.static final StringIf thelocationis an HTTPS resource, this setting tells whether to skip hostname verification in the TLS connection (useful during testing).static final StringThe certificate used to validate the metadata. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedMetadataProviderSettings(Map<String, Object> settings) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Constructs a newMetadataProviderSettings.Builderwith no settings.If thelocationsetting is a URL, a "backup location" may be assigned to store downloaded metadata.Gets the HTTP proxy settings.Gives the Spring SSL Bundle that gives us the TLS trust settings to use during TLS verification.Gets the location of the metadata.getMdq()If thelocationsetting is a URL, setting the MDQ-flag means that the metadata MDQ (https://www.ietf.org/id/draft-young-md-query-17.html) protocol is used.Tells whether to skip hostname verification in the TLS connection (useful during testing).Gets the certificate used to validate the metadata.withSettings(Map<String, Object> settings) Constructs a newMetadataProviderSettings.Builderwith the provided settings.Methods inherited from class se.swedenconnect.spring.saml.idp.settings.AbstractSettings
equals, getSetting, getSettings, hashCode, toString
-
Field Details
-
SAML_METADATA_PROVIDER_LOCATION
The location of the metadata. Can be a URL, a file, or even a classpath resource. Represented using aResource.- See Also:
-
SAML_METADATA_PROVIDER_HTTPS_TRUST_BUNDLE
If thelocationis an HTTPS resource, this setting may be used to specify a Spring SSL Bundle that gives theTrustManagers to use during TLS verification. If no bundle is given, the Java trust default will be used.- See Also:
-
SAML_METADATA_PROVIDER_SKIP_HOSTNAME_VERIFICATION
If thelocationis an HTTPS resource, this setting tells whether to skip hostname verification in the TLS connection (useful during testing).- See Also:
-
SAML_METADATA_PROVIDER_BACKUP_LOCATION
If thelocationsetting is a URL, a "backup location" may be assigned to store downloaded metadata. AFile.- See Also:
-
SAML_METADATA_PROVIDER_MDQ
If thelocationsetting is a URL, setting the MDQ-flag means that the metadata MDQ (https://www.ietf.org/id/draft-young-md-query-17.html) protocol is used. ABoolean.- See Also:
-
SAML_METADATA_PROVIDER_VALIDATION_CERTIFICATE
The certificate used to validate the metadata. AX509Certificate.- See Also:
-
SAML_METADATA_PROVIDER_HTTP_PROXY
If thelocationsetting is a URL and an HTTP proxy is required this setting configures this proxy. AMetadataProviderSettings.HttpProxySettings.- See Also:
-
-
Constructor Details
-
MetadataProviderSettings
Constructor.- Parameters:
settings- the settings
-
-
Method Details
-
getLocation
Gets the location of the metadata. Can be a URL, a file, or even a classpath resource.- Returns:
- the metadata location
-
getHttpsTrustBundle
Gives the Spring SSL Bundle that gives us the TLS trust settings to use during TLS verification. Ifnull, the Java trust default will be used.Only relevant if the
locationis an HTTPS resource.- Returns:
- a name for a trust SSL bundle, or
nullif not assigned
-
getSkipHostnameVerification
Tells whether to skip hostname verification in the TLS connection (useful during testing).- Returns:
trueif hostname verification should be skipped
-
getBackupLocation
If thelocationsetting is a URL, a "backup location" may be assigned to store downloaded metadata. This method returns this file.- Returns:
- a file or
null
-
getMdq
If thelocationsetting is a URL, setting the MDQ-flag means that the metadata MDQ (https://www.ietf.org/id/draft-young-md-query-17.html) protocol is used. This method returns this setting.- Returns:
- whether MDQ is active or not
-
getValidationCertificate
Gets the certificate used to validate the metadata.- Returns:
- the validation certificate or
nullif not assigned
-
getHttpProxy
Gets the HTTP proxy settings.- Returns:
- the proxy settings or
null
-
builder
Constructs a newMetadataProviderSettings.Builderwith no settings.- Returns:
- the
MetadataProviderSettings.Builder
-
withSettings
Constructs a newMetadataProviderSettings.Builderwith the provided settings.- Parameters:
settings- the settings to initialize the builder- Returns:
- the builder
-