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
Modifier and TypeClassDescriptionstatic final class
A builder forMetadataProviderSettings
.static class
Settings 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
Modifier and TypeFieldDescriptionstatic final String
If thelocation
setting is a URL, a "backup location" may be assigned to store downloaded metadata.static final String
If thelocation
setting is a URL and an HTTP proxy is required this setting configures this proxy.static final String
The location of the metadata.static final String
If thelocation
setting 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 String
If thelocation
is an HTTPS resource, this setting tells whether to skip hostname verification in the TLS connection (useful during testing).static final String
The certificate used to validate the metadata. -
Constructor Summary
ModifierConstructorDescriptionprotected
MetadataProviderSettings
(Map<String, Object> settings) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
Constructs a newMetadataProviderSettings.Builder
with no settings.If thelocation
setting is a URL, a "backup location" may be assigned to store downloaded metadata.Gets the HTTP proxy settings.Gets the location of the metadata.getMdq()
If thelocation
setting 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.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_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_SKIP_HOSTNAME_VERIFICATION
If thelocation
is 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 thelocation
setting is a URL, a "backup location" may be assigned to store downloaded metadata. AFile
.- See Also:
-
SAML_METADATA_PROVIDER_MDQ
If thelocation
setting 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 thelocation
setting 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
-
getSkipHostnameVerification
Tells whether to skip hostname verification in the TLS connection (useful during testing).- Returns:
true
if hostname verification should be skipped
-
getBackupLocation
If thelocation
setting 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 thelocation
setting 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
null
if not assigned
-
getHttpProxy
Gets the HTTP proxy settings.- Returns:
- the proxy settings or
null
-
builder
Constructs a newMetadataProviderSettings.Builder
with no settings.- Returns:
- the
MetadataProviderSettings.Builder
-
withSettings
Constructs a newMetadataProviderSettings.Builder
with the provided settings.- Parameters:
settings
- the settings to initialize the builder- Returns:
- the builder
-