Class Saml2LogoutConfigurer<H extends HttpSecurityBuilder<H>>
java.lang.Object
org.springframework.security.config.annotation.SecurityConfigurerAdapter<org.springframework.security.web.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<org.springframework.security.web.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 populatedLogoutFilter
Saml2LogoutRequestFilter
Saml2LogoutResponseFilter
The following configuration options are available:
logoutUrl
- The URL to to process SAML 2.0 LogoutSaml2LogoutConfigurer.LogoutRequestConfigurer.logoutRequestValidator
- TheAuthenticationManager
for authenticating SAML 2.0 Logout RequestsSaml2LogoutConfigurer.LogoutRequestConfigurer.logoutRequestResolver
- TheSaml2LogoutRequestResolver
for creating SAML 2.0 Logout RequestsSaml2LogoutConfigurer.LogoutRequestConfigurer.logoutRequestRepository
- TheSaml2LogoutRequestRepository
for storing SAML 2.0 Logout RequestsSaml2LogoutConfigurer.LogoutResponseConfigurer.logoutResponseValidator
- TheAuthenticationManager
for authenticating SAML 2.0 Logout ResponsesSaml2LogoutConfigurer.LogoutResponseConfigurer.logoutResponseResolver
- TheSaml2LogoutResponseResolver
for 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
Modifier and TypeClassDescriptionfinal class
A configurer for SAML 2.0 LogoutRequest componentsfinal class
-
Constructor Summary
ConstructorDescriptionSaml2LogoutConfigurer
(org.springframework.context.ApplicationContext context) Creates a new instance -
Method Summary
Modifier and TypeMethodDescriptionvoid
Configure theSecurityBuilder
by setting the necessary properties on theSecurityBuilder
.Get configurer for SAML 2.0 Logout Request componentslogoutRequest
(Customizer<Saml2LogoutConfigurer<H>.LogoutRequestConfigurer> logoutRequestConfigurerCustomizer) Configures SAML 2.0 Logout Request componentsGet configurer for SAML 2.0 Logout Response componentslogoutResponse
(Customizer<Saml2LogoutConfigurer<H>.LogoutResponseConfigurer> logoutResponseConfigurerCustomizer) Configures SAML 2.0 Logout Request componentsThe URL by which the relying or asserting party can trigger logout.relyingPartyRegistrationRepository
(org.springframework.security.saml2.provider.service.registration.RelyingPartyRegistrationRepository repo) Sets theRelyingPartyRegistrationRepository
of 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
Methods inherited from class org.springframework.security.config.annotation.SecurityConfigurerAdapter
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
LogoutConfigurer
for further customizations - See Also:
-
relyingPartyRegistrationRepository
public Saml2LogoutConfigurer<H> relyingPartyRegistrationRepository(org.springframework.security.saml2.provider.service.registration.RelyingPartyRegistrationRepository repo) Sets theRelyingPartyRegistrationRepository
of 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
Saml2LogoutConfigurer
for further customizations
-
logoutRequest
Get configurer for SAML 2.0 Logout Request components- Returns:
- the
Saml2LogoutConfigurer<H extends HttpSecurityBuilder<H>>.LogoutRequestConfigurer
for further customizations
-
logoutRequest
public Saml2LogoutConfigurer<H> logoutRequest(Customizer<Saml2LogoutConfigurer<H>.LogoutRequestConfigurer> logoutRequestConfigurerCustomizer) Configures SAML 2.0 Logout Request components- Parameters:
logoutRequestConfigurerCustomizer
- theCustomizer
to provide more options for theSaml2LogoutConfigurer<H extends HttpSecurityBuilder<H>>.LogoutRequestConfigurer
- Returns:
- the
Saml2LogoutConfigurer
for further customizations
-
logoutResponse
Get configurer for SAML 2.0 Logout Response components- Returns:
- the
Saml2LogoutConfigurer<H extends HttpSecurityBuilder<H>>.LogoutResponseConfigurer
for further customizations
-
logoutResponse
public Saml2LogoutConfigurer<H> logoutResponse(Customizer<Saml2LogoutConfigurer<H>.LogoutResponseConfigurer> logoutResponseConfigurerCustomizer) Configures SAML 2.0 Logout Request components- Parameters:
logoutResponseConfigurerCustomizer
- theCustomizer
to provide more options for theSaml2LogoutConfigurer<H extends HttpSecurityBuilder<H>>.LogoutResponseConfigurer
- Returns:
- the
Saml2LogoutConfigurer
for further customizations
-
configure
Configure theSecurityBuilder
by setting the necessary properties on theSecurityBuilder
.- Specified by:
configure
in interfaceSecurityConfigurer<org.springframework.security.web.DefaultSecurityFilterChain,
H extends HttpSecurityBuilder<H>> - Overrides:
configure
in classSecurityConfigurerAdapter<org.springframework.security.web.DefaultSecurityFilterChain,
H extends HttpSecurityBuilder<H>> - Throws:
Exception
-