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.logoutRequest(Customizer<Saml2LogoutConfigurer<H>.LogoutRequestConfigurer> logoutRequestConfigurerCustomizer) Configures SAML 2.0 Logout Request componentslogoutResponse(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, getRequestMatcherBuilder, getSecurityContextHolderStrategy, withObjectPostProcessorMethods inherited from class org.springframework.security.config.annotation.SecurityConfigurerAdapter
addObjectPostProcessor, 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
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
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
-