public class SSOConfigurer extends org.springframework.security.config.annotation.SecurityConfigurerAdapter<Void,ServiceProviderBuilder>
Builder configurer that takes care of configuring/customizing the SAMLProcessingFilter,
SAMLWebSSOHoKProcessingFilter, SAMLDiscovery, and SAMLEntryPoint bean.
This configurer always instantiates its own SAMLProcessingFilter,
SAMLWebSSOHoKProcessingFilter, SAMLDiscovery, and SAMLEntryPoint based on the specified
configuration.
This configurer also reads the values from SAMLSSOProperties for some DSL methods if they are not used.
In other words, the user is able to configure the filters through the following properties:
saml.sso.default-success-url
saml.sso.default-failure-url
saml.sso.sso-processing-url
saml.sso.enable-sso-hok
saml.sso.discovery-processing-url
saml.sso.idp-selection-page-url
saml.sso.sso-login-url
saml.sso.profile-options.binding
saml.sso.profile-options.allowed-idps
saml.sso.profile-options.provider-name
saml.sso.profile-options.assertion-consumer-index
saml.sso.profile-options.name-id
saml.sso.profile-options.allow-create
saml.sso.profile-options.passive
saml.sso.profile-options.force-authn
saml.sso.profile-options.include-scoping
saml.sso.profile-options.proxy-count
saml.sso.profile-options.relay-state
saml.sso.profile-options.authn-contexts
saml.sso.profile-options.authn-context-comparison
| Constructor and Description |
|---|
SSOConfigurer() |
| Modifier and Type | Method and Description |
|---|---|
void |
configure(ServiceProviderBuilder builder) |
protected org.springframework.security.web.authentication.SimpleUrlAuthenticationFailureHandler |
createDefaultFailureHandler() |
protected org.springframework.security.saml.SAMLDiscovery |
createDefaultSamlDiscoveryFilter() |
protected org.springframework.security.saml.SAMLEntryPoint |
createDefaultSamlEntryPoint() |
protected org.springframework.security.saml.SAMLWebSSOHoKProcessingFilter |
createDefaultSamlHoKProcessingFilter() |
protected org.springframework.security.saml.SAMLProcessingFilter |
createDefaultSamlProcessingFilter() |
protected org.springframework.security.web.authentication.SavedRequestAwareAuthenticationSuccessHandler |
createDefaultSuccessHandler() |
SSOConfigurer |
defaultFailureURL(String defaultFailureURL)
The URL which will be used as the failure destination.
|
SSOConfigurer |
defaultSuccessURL(String defaultSuccessURL)
Supplies the default target Url that will be used if no saved request is found in the session, or the
alwaysUseDefaultTargetUrl property is set to true.
|
SSOConfigurer |
discoveryProcessingURL(String discoveryProcessingURL)
The URL that the
SAMLDiscovery filter will be listening to. |
SSOConfigurer |
enableSsoHoK(boolean enableSsoHoK)
Whether to enable the
SAMLWebSSOHoKProcessingFilter filter or not. |
SSOConfigurer |
failureHandler(org.springframework.security.web.authentication.AuthenticationFailureHandler failureHandler)
Provide a specific
AuthenticationFailureHandler to be invoked on unsuccessful authentication. |
SSOConfigurer |
idpSelectionPageURL(String idpSelectionPageURL)
Sets path where request dispatcher will send user for IDP selection.
|
void |
init(ServiceProviderBuilder builder) |
SSOConfigurer |
profileOptions(org.springframework.security.saml.websso.WebSSOProfileOptions profileOptions)
Provide a specific
WebSSOProfileOptions options. |
SSOConfigurer |
samlEntryPoint(org.springframework.security.saml.SAMLEntryPoint samlEntryPoint)
Provide a specific
SAMLEntryPoint. |
SSOConfigurer |
ssoHoKProcessingURL(String ssoHoKProcessingURL)
The URL that the
SAMLWebSSOHoKProcessingFilter will be listening to. |
SSOConfigurer |
ssoLoginURL(String ssoLoginURL)
The URL that the
SAMLEntryPoint filter will be listening to. |
SSOConfigurer |
ssoProcessingURL(String ssoProcessingURL)
The URL that the
SAMLProcessingFilter will be listening to. |
SSOConfigurer |
successHandler(org.springframework.security.web.authentication.AuthenticationSuccessHandler successHandler)
Provide a specific
AuthenticationSuccessHandler to be invoked on successful authentication. |
public void init(ServiceProviderBuilder builder) throws Exception
init in interface org.springframework.security.config.annotation.SecurityConfigurer<Void,ServiceProviderBuilder>init in class org.springframework.security.config.annotation.SecurityConfigurerAdapter<Void,ServiceProviderBuilder>Exceptionpublic void configure(ServiceProviderBuilder builder) throws Exception
configure in interface org.springframework.security.config.annotation.SecurityConfigurer<Void,ServiceProviderBuilder>configure in class org.springframework.security.config.annotation.SecurityConfigurerAdapter<Void,ServiceProviderBuilder>Exceptionprotected org.springframework.security.saml.SAMLWebSSOHoKProcessingFilter createDefaultSamlHoKProcessingFilter()
protected org.springframework.security.saml.SAMLEntryPoint createDefaultSamlEntryPoint()
protected org.springframework.security.saml.SAMLDiscovery createDefaultSamlDiscoveryFilter()
protected org.springframework.security.saml.SAMLProcessingFilter createDefaultSamlProcessingFilter()
protected org.springframework.security.web.authentication.SimpleUrlAuthenticationFailureHandler createDefaultFailureHandler()
protected org.springframework.security.web.authentication.SavedRequestAwareAuthenticationSuccessHandler createDefaultSuccessHandler()
public SSOConfigurer samlEntryPoint(org.springframework.security.saml.SAMLEntryPoint samlEntryPoint)
SAMLEntryPoint.samlEntryPoint - the actual entry point.public SSOConfigurer defaultSuccessURL(String defaultSuccessURL)
successHandler(AuthenticationSuccessHandler) is used.
Alternatively use property:
saml.sso.default-success-url
defaultSuccessURL - the default target URLpublic SSOConfigurer successHandler(org.springframework.security.web.authentication.AuthenticationSuccessHandler successHandler)
AuthenticationSuccessHandler to be invoked on successful authentication. Overrides
value set by defaultSuccessURL(String).successHandler - the actual success handler.public SSOConfigurer defaultFailureURL(String defaultFailureURL)
failureHandler(AuthenticationFailureHandler).
Default is "/error".
Alternatively use property:
saml.sso.default-failure-url
defaultFailureURL - the failure URL, for example "/loginFailed.jsp".public SSOConfigurer failureHandler(org.springframework.security.web.authentication.AuthenticationFailureHandler failureHandler)
AuthenticationFailureHandler to be invoked on unsuccessful authentication. Overrides
value set by defaultFailureURL(String).failureHandler - the actual failure handler.public SSOConfigurer ssoProcessingURL(String ssoProcessingURL)
SAMLProcessingFilter will be listening to.
Default is "/saml/SSO".
Alternatively use property:
saml.sso.sso-processing-url
ssoProcessingURL - the URL that the SAMLProcessingFilter will be listening to.public SSOConfigurer ssoHoKProcessingURL(String ssoHoKProcessingURL)
SAMLWebSSOHoKProcessingFilter will be listening to.
Default is "/saml/HoKSSO".
Alternatively use property:
saml.sso.sso-hok-Processing-url
ssoHoKProcessingURL - the URL that the SAMLWebSSOHoKProcessingFilter will be listening to.public SSOConfigurer enableSsoHoK(boolean enableSsoHoK)
SAMLWebSSOHoKProcessingFilter filter or not.
Default is true.
Alternatively use property:
saml.sso.enable-sso-hok
enableSsoHoK - true if HoK Filter is enabled.public SSOConfigurer discoveryProcessingURL(String discoveryProcessingURL)
SAMLDiscovery filter will be listening to.
Default is "/saml/discovery".
Alternatively use property:
saml.sso.discovery-processing-url
discoveryProcessingURL - the URL that the SAMLDiscovery filter will be listening to.public SSOConfigurer idpSelectionPageURL(String idpSelectionPageURL)
"/idpselection".
Alternatively use property:
saml.sso.idp-selection-page-url
idpSelectionPageURL - selection path.public SSOConfigurer ssoLoginURL(String ssoLoginURL)
SAMLEntryPoint filter will be listening to.
Default is "/saml/login".
Alternatively use property:
saml.sso.sso-login-url
ssoLoginURL - the URL that the SAMLEntryPoint filter will be listening to.public SSOConfigurer profileOptions(org.springframework.security.saml.websso.WebSSOProfileOptions profileOptions)
WebSSOProfileOptions options.
Alternatively use properties:
saml.sso.profile-options.binding
saml.sso.profile-options.allowed-idps
saml.sso.profile-options.provider-name
saml.sso.profile-options.assertion-consumer-index
saml.sso.profile-options.name-id
saml.sso.profile-options.allow-create
saml.sso.profile-options.passive
saml.sso.profile-options.force-authn
saml.sso.profile-options.include-scoping
saml.sso.profile-options.proxy-count
saml.sso.profile-options.relay-state
saml.sso.profile-options.authn-contexts
saml.sso.profile-options.authn-context-comparison
profileOptions - the SSO Profile Options.Copyright © 2018. All rights reserved.