public class HttpStatusReturningLogoutSuccessHandler extends Object implements LogoutSuccessHandler
LogoutSuccessHandler. By default returns an HTTP status
code of 200. This is useful in REST-type scenarios where a redirect upon a
successful logout is not desired.| Constructor and Description |
|---|
HttpStatusReturningLogoutSuccessHandler()
Initialize the
HttpStatusLogoutSuccessHandler with the default
HttpStatus.OK. |
HttpStatusReturningLogoutSuccessHandler(HttpStatus httpStatusToReturn)
Initialize the
HttpStatusLogoutSuccessHandler with a user-defined
HttpStatus. |
| Modifier and Type | Method and Description |
|---|---|
void |
onLogoutSuccess(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.security.core.Authentication authentication)
|
public HttpStatusReturningLogoutSuccessHandler(HttpStatus httpStatusToReturn)
HttpStatusLogoutSuccessHandler with a user-defined
HttpStatus.httpStatusToReturn - Must not be null.public HttpStatusReturningLogoutSuccessHandler()
HttpStatusLogoutSuccessHandler with the default
HttpStatus.OK.public void onLogoutSuccess(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.security.core.Authentication authentication)
throws IOException,
javax.servlet.ServletException
LogoutSuccessHandler.onLogoutSuccess(HttpServletRequest, HttpServletResponse, Authentication)
. Sets the status on the HttpServletResponse.onLogoutSuccess in interface LogoutSuccessHandlerIOExceptionjavax.servlet.ServletException