Class ServerHttpSecurity.LogoutSpec
java.lang.Object
org.springframework.security.config.web.server.ServerHttpSecurity.LogoutSpec
- Enclosing class:
- ServerHttpSecurity
Configures log out
- Since:
- 5.0
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionprotected voidconfigure(ServerHttpSecurity http) disable()Disables log outlogoutHandler(Consumer<List<ServerLogoutHandler>> handlersConsumer) Allows managing the list ofServerLogoutHandlerinstances.logoutHandler(ServerLogoutHandler logoutHandler) Configures the logout handler.Configures what URL a POST to will trigger a log out.requiresLogout(ServerWebExchangeMatcher requiresLogout) Configures when the log out will be triggered.
-
Method Details
-
logoutHandler
Configures the logout handler. Default isSecurityContextServerLogoutHandler. This clears any previous handlers configured.- Parameters:
logoutHandler-- Returns:
- the
ServerHttpSecurity.LogoutSpecto configure
-
logoutHandler
public ServerHttpSecurity.LogoutSpec logoutHandler(Consumer<List<ServerLogoutHandler>> handlersConsumer) Allows managing the list ofServerLogoutHandlerinstances.- Parameters:
handlersConsumer-Consumerfor managing the list of handlers.- Returns:
- the
ServerHttpSecurity.LogoutSpecto configure - Since:
- 7.0
-
logoutUrl
Configures what URL a POST to will trigger a log out.- Parameters:
logoutUrl- the url to trigger a log out (i.e. "/signout" would mean a POST to "/signout" would trigger log out)- Returns:
- the
ServerHttpSecurity.LogoutSpecto configure
-
requiresLogout
Configures when the log out will be triggered.- Parameters:
requiresLogout- the matcher to determine when log out is triggered- Returns:
- the
ServerHttpSecurity.LogoutSpecto configure
-
logoutSuccessHandler
-
disable
Disables log out- Returns:
- the
ServerHttpSecurityto continue configuring
-
configure
-