Class MetadataProviderSettings.Builder
java.lang.Object
se.swedenconnect.spring.saml.idp.settings.AbstractSettings.AbstractBuilder<MetadataProviderSettings,MetadataProviderSettings.Builder>
se.swedenconnect.spring.saml.idp.settings.MetadataProviderSettings.Builder
- Enclosing class:
MetadataProviderSettings
public static final class MetadataProviderSettings.Builder
extends AbstractSettings.AbstractBuilder<MetadataProviderSettings,MetadataProviderSettings.Builder>
A builder for
MetadataProviderSettings
.-
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.backupLocation
(File backupLocation) Assigns the backup file.protected MetadataProviderSettings
Is invoked byAbstractSettings.AbstractBuilder.build()
and builds the settings object.Assigns the HTTP proxy settings.Assigns the location of the metadata.Assigns whether MDQ should be used.Tells whether to skip hostname verification in the TLS connection (useful during testing).validationCertificate
(X509Certificate validationCertificate) Assigns the certificate used to validate the metadata.Methods inherited from class se.swedenconnect.spring.saml.idp.settings.AbstractSettings.AbstractBuilder
build, getSettings, getThis, setting, settings
-
Method Details
-
location
Assigns the location of the metadata. Can be a URL, a file, or even a classpath resource.- Parameters:
location
- the metadata location- Returns:
- the builder
-
skipHostnameVerification
Tells whether to skip hostname verification in the TLS connection (useful during testing).- Parameters:
skip
-true
if hostname verification should be skipped- Returns:
- the builder
-
backupLocation
Assigns the backup file.If the
location
setting is an URL, a "backup location" may be assigned to store downloaded metadata.- Parameters:
backupLocation
- the backup location file- Returns:
- the builder
-
mdq
Assigns whether MDQ should be used.If the
location
setting is an URL, setting the MDQ-flag means that the metadata MDQ (https://www.ietf.org/id/draft-young-md-query-17.html) protocol is used.- Parameters:
mdq
- whether MDQ should be used- Returns:
- the builder
-
validationCertificate
public MetadataProviderSettings.Builder validationCertificate(X509Certificate validationCertificate) Assigns the certificate used to validate the metadata.- Parameters:
validationCertificate
- the validation certificate- Returns:
- the builder
-
httpProxy
public MetadataProviderSettings.Builder httpProxy(MetadataProviderSettings.HttpProxySettings httpProxy) Assigns the HTTP proxy settings.- Parameters:
httpProxy
- the proxy settings- Returns:
- the builder
-
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<MetadataProviderSettings,
MetadataProviderSettings.Builder>
-
buildObject
Is invoked byAbstractSettings.AbstractBuilder.build()
and builds the settings object.- Specified by:
buildObject
in classAbstractSettings.AbstractBuilder<MetadataProviderSettings,
MetadataProviderSettings.Builder> - Returns:
- the settings object
-