Class HttpStatusReturningServerLogoutSuccessHandler
java.lang.Object
org.springframework.security.web.server.authentication.logout.HttpStatusReturningServerLogoutSuccessHandler
- All Implemented Interfaces:
ServerLogoutSuccessHandler
public class HttpStatusReturningServerLogoutSuccessHandler
extends Object
implements ServerLogoutSuccessHandler
Implementation of the
ServerLogoutSuccessHandler. 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.- Since:
- 5.1
-
Constructor Summary
ConstructorsConstructorDescriptionInitialize theHttpStatusReturningServerLogoutSuccessHandlerwith the defaultHttpStatus.OK.HttpStatusReturningServerLogoutSuccessHandler(org.springframework.http.HttpStatus httpStatusToReturn) Initialize theHttpStatusReturningServerLogoutSuccessHandlerwith a user-definedHttpStatus. -
Method Summary
Modifier and TypeMethodDescriptionreactor.core.publisher.Mono<Void>onLogoutSuccess(WebFilterExchange exchange, org.springframework.security.core.Authentication authentication)
-
Constructor Details
-
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 Details
-
onLogoutSuccess
public reactor.core.publisher.Mono<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)
-