Class Saml2LogoutConfigurer<H extends HttpSecurityBuilder<H>>
java.lang.Object
org.springframework.security.config.annotation.SecurityConfigurerAdapter<DefaultSecurityFilterChain,B>
org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer<Saml2LogoutConfigurer<H>,H>
org.springframework.security.config.annotation.web.configurers.saml2.Saml2LogoutConfigurer<H>
- All Implemented Interfaces:
SecurityConfigurer<DefaultSecurityFilterChain,H>
public final class Saml2LogoutConfigurer<H extends HttpSecurityBuilder<H>>
extends AbstractHttpConfigurer<Saml2LogoutConfigurer<H>,H>
Adds SAML 2.0 logout support.
Security Filters
The following Filters are populatedThe following configuration options are available:
logoutUrl- The URL to to process SAML 2.0 LogoutSaml2LogoutConfigurer.LogoutRequestConfigurer.logoutRequestValidator- TheAuthenticationManagerfor authenticating SAML 2.0 Logout RequestsSaml2LogoutConfigurer.LogoutRequestConfigurer.logoutRequestResolver- TheSaml2LogoutRequestResolverfor creating SAML 2.0 Logout RequestsSaml2LogoutConfigurer.LogoutRequestConfigurer.logoutRequestRepository- TheSaml2LogoutRequestRepositoryfor storing SAML 2.0 Logout RequestsSaml2LogoutConfigurer.LogoutResponseConfigurer.logoutResponseValidator- TheAuthenticationManagerfor authenticating SAML 2.0 Logout ResponsesSaml2LogoutConfigurer.LogoutResponseConfigurer.logoutResponseResolver- TheSaml2LogoutResponseResolverfor creating SAML 2.0 Logout Responses
Shared Objects Created
No shared Objects are createdShared Objects Used
UsesCsrfTokenRepository to add the CsrfLogoutHandler.- Since:
- 5.6
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionfinal classA configurer for SAML 2.0 LogoutRequest componentsfinal class -
Constructor Summary
ConstructorsConstructorDescriptionSaml2LogoutConfigurer(org.springframework.context.ApplicationContext context) Creates a new instance -
Method Summary
Modifier and TypeMethodDescriptionvoidConfigure theSecurityBuilderby setting the necessary properties on theSecurityBuilder.Deprecated, for removal: This API element is subject to removal in a future version.For removal in 7.0.logoutRequest(Customizer<Saml2LogoutConfigurer<H>.LogoutRequestConfigurer> logoutRequestConfigurerCustomizer) Configures SAML 2.0 Logout Request componentsDeprecated, for removal: This API element is subject to removal in a future version.For removal in 7.0.logoutResponse(Customizer<Saml2LogoutConfigurer<H>.LogoutResponseConfigurer> logoutResponseConfigurerCustomizer) Configures SAML 2.0 Logout Response componentsThe URL by which the relying or asserting party can trigger logout.Sets theRelyingPartyRegistrationRepositoryof relying parties, each party representing a service provider, SP and this host, and identity provider, IDP pair that communicate with each other.Methods inherited from class org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer
disable, getSecurityContextHolderStrategy, withObjectPostProcessor, withObjectPostProcessorMethods inherited from class org.springframework.security.config.annotation.SecurityConfigurerAdapter
addObjectPostProcessor, addObjectPostProcessor, and, getBuilder, init, postProcess, setBuilder
-
Constructor Details
-
Saml2LogoutConfigurer
public Saml2LogoutConfigurer(org.springframework.context.ApplicationContext context) Creates a new instance- See Also:
-
-
Method Details
-
logoutUrl
The URL by which the relying or asserting party can trigger logout.The Relying Party triggers logout by POSTing to the endpoint. The Asserting Party triggers logout based on what is specified by
RelyingPartyRegistration.getSingleLogoutServiceBindings().- Parameters:
logoutUrl- the URL that will invoke logout- Returns:
- the
LogoutConfigurerfor further customizations - See Also:
-
relyingPartyRegistrationRepository
public Saml2LogoutConfigurer<H> relyingPartyRegistrationRepository(RelyingPartyRegistrationRepository repo) Sets theRelyingPartyRegistrationRepositoryof relying parties, each party representing a service provider, SP and this host, and identity provider, IDP pair that communicate with each other.- Parameters:
repo- the repository of relying parties- Returns:
- the
Saml2LogoutConfigurerfor further customizations
-
logoutRequest
@Deprecated(since="6.1", forRemoval=true) public Saml2LogoutConfigurer<H>.LogoutRequestConfigurer logoutRequest()Deprecated, for removal: This API element is subject to removal in a future version.For removal in 7.0. UselogoutRequest(Customizer)orlogoutRequest(Customizer.withDefaults())to stick with defaults. See the documentation for more details.Get configurer for SAML 2.0 Logout Request components- Returns:
- the
Saml2LogoutConfigurer<H extends HttpSecurityBuilder<H>>.LogoutRequestConfigurerfor further customizations
-
logoutRequest
public Saml2LogoutConfigurer<H> logoutRequest(Customizer<Saml2LogoutConfigurer<H>.LogoutRequestConfigurer> logoutRequestConfigurerCustomizer) Configures SAML 2.0 Logout Request components- Parameters:
logoutRequestConfigurerCustomizer- theCustomizerto provide more options for theSaml2LogoutConfigurer<H extends HttpSecurityBuilder<H>>.LogoutRequestConfigurer- Returns:
- the
Saml2LogoutConfigurerfor further customizations
-
logoutResponse
@Deprecated(since="6.1", forRemoval=true) public Saml2LogoutConfigurer<H>.LogoutResponseConfigurer logoutResponse()Deprecated, for removal: This API element is subject to removal in a future version.For removal in 7.0. UselogoutResponse(Customizer)orlogoutResponse(Customizer.withDefaults())to stick with defaults. See the documentation for more details.Get configurer for SAML 2.0 Logout Response components- Returns:
- the
Saml2LogoutConfigurer<H extends HttpSecurityBuilder<H>>.LogoutResponseConfigurerfor further customizations
-
logoutResponse
public Saml2LogoutConfigurer<H> logoutResponse(Customizer<Saml2LogoutConfigurer<H>.LogoutResponseConfigurer> logoutResponseConfigurerCustomizer) Configures SAML 2.0 Logout Response components- Parameters:
logoutResponseConfigurerCustomizer- theCustomizerto provide more options for theSaml2LogoutConfigurer<H extends HttpSecurityBuilder<H>>.LogoutResponseConfigurer- Returns:
- the
Saml2LogoutConfigurerfor further customizations
-
configure
Configure theSecurityBuilderby setting the necessary properties on theSecurityBuilder.- Specified by:
configurein interfaceSecurityConfigurer<DefaultSecurityFilterChain,H extends HttpSecurityBuilder<H>> - Overrides:
configurein classSecurityConfigurerAdapter<DefaultSecurityFilterChain,H extends HttpSecurityBuilder<H>> - Throws:
Exception
-