Class Saml2LogoutConfigurer
SAML 2.0 Single Logout, front channel, for the users saml2Login signs in:
http.saml2Login(Customizer.withDefaults())
.saml2Logout(Customizer.withDefaults());
- Signing out here (the chain's ordinary sign-out,
POST /logout) ends the session, then sends the browser to the identity provider with a signedLogoutRequest, so the user is signed out there and of the other applications it signed them in to. The provider answers at/logout/saml2/slo/{registrationId}, and the browser goes on to the chain's sign-out page. - Signing out elsewhere: the identity provider sends a signed
LogoutRequestto/logout/saml2/slo/{registrationId}; the session of the user it names ends, and the browser is sent back with a signedLogoutResponse.
A registration takes part when it has a signing credential and the
identity provider's logout address (from its metadata, or
assertingparty.singlelogout.url); for any other, signing out ends the
session here alone, as without this configurer. This server's metadata
lists its logout address once this is declared.
Prefer the HTTP-Redirect binding for the identity provider's logout
address. A logout the identity provider starts arrives as a cross-site
request, and only a top-level GET carries the SameSite=Lax session
cookie: a request that arrives by POST finds no session, is answered with
success, and the session here lives on to its expiry. That is how browsers
treat cookies, and Spring Security has the same limit. SOAP (back
channel) logout is not supported.
-
Method Summary
Modifier and TypeMethodDescriptionvoidconfigure(HttpSecurity http) Adds this part's filters; nothing by default.voidinit(HttpSecurity http) Shares what other parts need to know; nothing by default.logoutBaseUri(String baseUri) The path logout messages arrive at, before the registration's id.Methods inherited from class SecurityConfigurer
disable, getBuilder
-
Method Details
-
logoutBaseUri
The path logout messages arrive at, before the registration's id. The registrations'singlelogout.urlmust agree with it. -
init
Description copied from class:SecurityConfigurerShares what other parts need to know; nothing by default.- Overrides:
initin classSecurityConfigurer
-
configure
Description copied from class:SecurityConfigurerAdds this part's filters; nothing by default.- Overrides:
configurein classSecurityConfigurer
-