Class HttpStatusReturningLogoutSuccessHandler
- java.lang.Object
-
- org.springframework.security.web.authentication.logout.HttpStatusReturningLogoutSuccessHandler
-
- All Implemented Interfaces:
LogoutSuccessHandler
public class HttpStatusReturningLogoutSuccessHandler extends java.lang.Object implements LogoutSuccessHandler
Implementation of theLogoutSuccessHandler. By default returns an HTTP status code of200. This is useful in REST-type scenarios where a redirect upon a successful logout is not desired.- Since:
- 4.0.2
-
-
Constructor Summary
Constructors Constructor Description HttpStatusReturningLogoutSuccessHandler()Initialize theHttpStatusLogoutSuccessHandlerwith the defaultHttpStatus.OK.HttpStatusReturningLogoutSuccessHandler(org.springframework.http.HttpStatus httpStatusToReturn)Initialize theHttpStatusLogoutSuccessHandlerwith a user-definedHttpStatus.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidonLogoutSuccess(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.springframework.security.core.Authentication authentication)
-
-
-
Constructor Detail
-
HttpStatusReturningLogoutSuccessHandler
public HttpStatusReturningLogoutSuccessHandler(org.springframework.http.HttpStatus httpStatusToReturn)
Initialize theHttpStatusLogoutSuccessHandlerwith a user-definedHttpStatus.- Parameters:
httpStatusToReturn- Must not benull.
-
HttpStatusReturningLogoutSuccessHandler
public HttpStatusReturningLogoutSuccessHandler()
Initialize theHttpStatusLogoutSuccessHandlerwith the defaultHttpStatus.OK.
-
-
Method Detail
-
onLogoutSuccess
public void onLogoutSuccess(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.springframework.security.core.Authentication authentication) throws java.io.IOExceptionImplementation ofLogoutSuccessHandler.onLogoutSuccess(HttpServletRequest, HttpServletResponse, Authentication). Sets the status on theHttpServletResponse.- Specified by:
onLogoutSuccessin interfaceLogoutSuccessHandler- Throws:
java.io.IOException
-
-