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 aSaml2RelyingPartyInitiatedLogoutSuccessHandlerusing the provided parameters -
Method Summary
Modifier and TypeMethodDescriptionvoidonLogoutSuccess(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 partyvoidsetLogoutRequestRepository(Saml2LogoutRequestRepository logoutRequestRepository) Use thisSaml2LogoutRequestRepositoryfor saving the SAML 2.0 Logout Request
-
Constructor Details
-
Saml2RelyingPartyInitiatedLogoutSuccessHandler
public Saml2RelyingPartyInitiatedLogoutSuccessHandler(Saml2LogoutRequestResolver logoutRequestResolver) Constructs aSaml2RelyingPartyInitiatedLogoutSuccessHandlerusing the provided parameters- Parameters:
logoutRequestResolver- theSaml2LogoutRequestResolverto 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:
onLogoutSuccessin interfaceLogoutSuccessHandler- Parameters:
request- the HTTP requestresponse- the HTTP responseauthentication- the current principal details- Throws:
IOException- when failing to write to the response
-
setLogoutRequestRepository
Use thisSaml2LogoutRequestRepositoryfor saving the SAML 2.0 Logout Request- Parameters:
logoutRequestRepository- theSaml2LogoutRequestRepositoryto use
-