Class HttpStatusReturningServerLogoutSuccessHandler
- java.lang.Object
-
- org.springframework.security.web.server.authentication.logout.HttpStatusReturningServerLogoutSuccessHandler
-
- All Implemented Interfaces:
ServerLogoutSuccessHandler
public class HttpStatusReturningServerLogoutSuccessHandler extends java.lang.Object implements ServerLogoutSuccessHandler
Implementation of theServerLogoutSuccessHandler. 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:
- 5.1
-
-
Constructor Summary
Constructors Constructor Description HttpStatusReturningServerLogoutSuccessHandler()Initialize theHttpStatusReturningServerLogoutSuccessHandlerwith the defaultHttpStatus.OK.HttpStatusReturningServerLogoutSuccessHandler(org.springframework.http.HttpStatus httpStatusToReturn)Initialize theHttpStatusReturningServerLogoutSuccessHandlerwith a user-definedHttpStatus.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description reactor.core.publisher.Mono<java.lang.Void>onLogoutSuccess(WebFilterExchange exchange, org.springframework.security.core.Authentication authentication)
-
-
-
Constructor Detail
-
HttpStatusReturningServerLogoutSuccessHandler
public HttpStatusReturningServerLogoutSuccessHandler(org.springframework.http.HttpStatus httpStatusToReturn)
Initialize theHttpStatusReturningServerLogoutSuccessHandlerwith a user-definedHttpStatus.- Parameters:
httpStatusToReturn- Must not benull.
-
HttpStatusReturningServerLogoutSuccessHandler
public HttpStatusReturningServerLogoutSuccessHandler()
Initialize theHttpStatusReturningServerLogoutSuccessHandlerwith the defaultHttpStatus.OK.
-
-
Method Detail
-
onLogoutSuccess
public reactor.core.publisher.Mono<java.lang.Void> onLogoutSuccess(WebFilterExchange exchange, org.springframework.security.core.Authentication authentication)
Implementation ofServerLogoutSuccessHandler.onLogoutSuccess(WebFilterExchange, Authentication). Sets the status on theWebFilterExchange.- Specified by:
onLogoutSuccessin interfaceServerLogoutSuccessHandler- Parameters:
exchange- The exchangeauthentication- TheAuthentication- Returns:
- A completion notification (success or error)
-
-