Class Saml2RelyingPartyInitiatedLogoutSuccessHandler
java.lang.Object
org.springframework.security.saml2.provider.service.web.authentication.logout.Saml2RelyingPartyInitiatedLogoutSuccessHandler
- All Implemented Interfaces:
LogoutSuccessHandler
public final class Saml2RelyingPartyInitiatedLogoutSuccessHandler
extends Object
implements LogoutSuccessHandler
A success handler for issuing a SAML 2.0 Logout Request to the SAML 2.0 Asserting Party
- Since:
- 5.6
-
Constructor Summary
ConstructorsConstructorDescriptionSaml2RelyingPartyInitiatedLogoutSuccessHandler
(Saml2LogoutRequestResolver logoutRequestResolver) Constructs aSaml2RelyingPartyInitiatedLogoutSuccessHandler
using the provided parameters -
Method Summary
Modifier and TypeMethodDescriptionvoid
onLogoutSuccess
(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, Authentication authentication) Produce and send a SAML 2.0 Logout Response based on the SAML 2.0 Logout Request received from the asserting partyvoid
setLogoutRequestRepository
(Saml2LogoutRequestRepository logoutRequestRepository) Use thisSaml2LogoutRequestRepository
for saving the SAML 2.0 Logout Request
-
Constructor Details
-
Saml2RelyingPartyInitiatedLogoutSuccessHandler
public Saml2RelyingPartyInitiatedLogoutSuccessHandler(Saml2LogoutRequestResolver logoutRequestResolver) Constructs aSaml2RelyingPartyInitiatedLogoutSuccessHandler
using the provided parameters- Parameters:
logoutRequestResolver
- theSaml2LogoutRequestResolver
to use
-
-
Method Details
-
onLogoutSuccess
public void onLogoutSuccess(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, Authentication authentication) throws IOException Produce and send a SAML 2.0 Logout Response based on the SAML 2.0 Logout Request received from the asserting party- Specified by:
onLogoutSuccess
in interfaceLogoutSuccessHandler
- Parameters:
request
- the HTTP requestresponse
- the HTTP responseauthentication
- the current principal details- Throws:
IOException
- when failing to write to the response
-
setLogoutRequestRepository
Use thisSaml2LogoutRequestRepository
for saving the SAML 2.0 Logout Request- Parameters:
logoutRequestRepository
- theSaml2LogoutRequestRepository
to use
-