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 populatedLogoutFilterSaml2LogoutRequestFilterSaml2LogoutResponseFilter
The 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
UsesCsrfTokenRepositoryto add theCsrfLogoutHandler.- Since:
- 5.6
- See Also:
Saml2LogoutConfigurer
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classSaml2LogoutConfigurer.LogoutRequestConfigurerA configurer for SAML 2.0 LogoutRequest componentsclassSaml2LogoutConfigurer.LogoutResponseConfigurer
-
Constructor Summary
Constructors Constructor Description Saml2LogoutConfigurer(org.springframework.context.ApplicationContext context)Creates a new instance
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconfigure(H http)Configure theSecurityBuilderby setting the necessary properties on theSecurityBuilder.Saml2LogoutConfigurer.LogoutRequestConfigurerlogoutRequest()Get configurer for SAML 2.0 Logout Request componentsSaml2LogoutConfigurer<H>logoutRequest(Customizer<Saml2LogoutConfigurer.LogoutRequestConfigurer> logoutRequestConfigurerCustomizer)Configures SAML 2.0 Logout Request componentsSaml2LogoutConfigurer.LogoutResponseConfigurerlogoutResponse()Get configurer for SAML 2.0 Logout Response componentsSaml2LogoutConfigurer<H>logoutResponse(Customizer<Saml2LogoutConfigurer.LogoutResponseConfigurer> logoutResponseConfigurerCustomizer)Configures SAML 2.0 Logout Request componentsSaml2LogoutConfigurer<H>logoutUrl(java.lang.String logoutUrl)The URL by which the relying or asserting party can trigger logout.Saml2LogoutConfigurer<H>relyingPartyRegistrationRepository(org.springframework.security.saml2.provider.service.registration.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.-
Methods inherited from class org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer
disable, withObjectPostProcessor
-
Methods inherited from class org.springframework.security.config.annotation.SecurityConfigurerAdapter
addObjectPostProcessor, and, getBuilder, init, postProcess, setBuilder
-
-
-
-
Constructor Detail
-
Saml2LogoutConfigurer
public Saml2LogoutConfigurer(org.springframework.context.ApplicationContext context)
Creates a new instance- See Also:
HttpSecurity.logout()
-
-
Method Detail
-
logoutUrl
public Saml2LogoutConfigurer<H> logoutUrl(java.lang.String 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.getSingleLogoutServiceBinding().- Parameters:
logoutUrl- the URL that will invoke logout- Returns:
- the
LogoutConfigurerfor further customizations - See Also:
LogoutConfigurer.logoutUrl(String),HttpSecurity.csrf()
-
relyingPartyRegistrationRepository
public Saml2LogoutConfigurer<H> relyingPartyRegistrationRepository(org.springframework.security.saml2.provider.service.registration.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.LogoutRequestConfigurer logoutRequest()
Get configurer for SAML 2.0 Logout Request components- Returns:
- the
Saml2LogoutConfigurer.LogoutRequestConfigurerfor further customizations
-
logoutRequest
public Saml2LogoutConfigurer<H> logoutRequest(Customizer<Saml2LogoutConfigurer.LogoutRequestConfigurer> logoutRequestConfigurerCustomizer)
Configures SAML 2.0 Logout Request components- Parameters:
logoutRequestConfigurerCustomizer- theCustomizerto provide more options for theSaml2LogoutConfigurer.LogoutRequestConfigurer- Returns:
- the
Saml2LogoutConfigurerfor further customizations
-
logoutResponse
public Saml2LogoutConfigurer.LogoutResponseConfigurer logoutResponse()
Get configurer for SAML 2.0 Logout Response components- Returns:
- the
Saml2LogoutConfigurer.LogoutResponseConfigurerfor further customizations
-
logoutResponse
public Saml2LogoutConfigurer<H> logoutResponse(Customizer<Saml2LogoutConfigurer.LogoutResponseConfigurer> logoutResponseConfigurerCustomizer)
Configures SAML 2.0 Logout Request components- Parameters:
logoutResponseConfigurerCustomizer- theCustomizerto provide more options for theSaml2LogoutConfigurer.LogoutResponseConfigurer- Returns:
- the
Saml2LogoutConfigurerfor further customizations
-
configure
public void configure(H http) throws java.lang.Exception
Configure theSecurityBuilderby setting the necessary properties on theSecurityBuilder.- Specified by:
configurein interfaceSecurityConfigurer<org.springframework.security.web.DefaultSecurityFilterChain,H extends HttpSecurityBuilder<H>>- Overrides:
configurein classSecurityConfigurerAdapter<org.springframework.security.web.DefaultSecurityFilterChain,H extends HttpSecurityBuilder<H>>- Throws:
java.lang.Exception
-
-