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 theHttpStatusReturningServerLogoutSuccessHandler
with the defaultHttpStatus.OK
.HttpStatusReturningServerLogoutSuccessHandler(org.springframework.http.HttpStatus httpStatusToReturn)
Initialize theHttpStatusReturningServerLogoutSuccessHandler
with 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, Authentication authentication)
-
-
-
Constructor Detail
-
HttpStatusReturningServerLogoutSuccessHandler
public HttpStatusReturningServerLogoutSuccessHandler(org.springframework.http.HttpStatus httpStatusToReturn)
Initialize theHttpStatusReturningServerLogoutSuccessHandler
with a user-definedHttpStatus
.- Parameters:
httpStatusToReturn
- Must not benull
.
-
HttpStatusReturningServerLogoutSuccessHandler
public HttpStatusReturningServerLogoutSuccessHandler()
Initialize theHttpStatusReturningServerLogoutSuccessHandler
with the defaultHttpStatus.OK
.
-
-
Method Detail
-
onLogoutSuccess
public reactor.core.publisher.Mono<java.lang.Void> onLogoutSuccess(WebFilterExchange exchange, Authentication authentication)
Implementation ofServerLogoutSuccessHandler.onLogoutSuccess(WebFilterExchange, Authentication)
. Sets the status on theWebFilterExchange
.- Specified by:
onLogoutSuccess
in interfaceServerLogoutSuccessHandler
- Parameters:
exchange
- The exchangeauthentication
- TheAuthentication
- Returns:
- A completion notification (success or error)
-
-