Class ServerHttpSecurity.LogoutSpec

java.lang.Object
org.springframework.security.config.web.server.ServerHttpSecurity.LogoutSpec
Enclosing class:
ServerHttpSecurity

public final class ServerHttpSecurity.LogoutSpec extends Object
Configures log out
Since:
5.0
See Also:
  • Method Details

    • logoutHandler

      public ServerHttpSecurity.LogoutSpec logoutHandler(org.springframework.security.web.server.authentication.logout.ServerLogoutHandler logoutHandler)
      Configures the logout handler. Default is SecurityContextServerLogoutHandler. This clears any previous handlers configured.
      Parameters:
      logoutHandler -
      Returns:
      the ServerHttpSecurity.LogoutSpec to configure
    • logoutHandler

      public ServerHttpSecurity.LogoutSpec logoutHandler(Consumer<List<org.springframework.security.web.server.authentication.logout.ServerLogoutHandler>> handlersConsumer)
      Allows managing the list of ServerLogoutHandler instances.
      Parameters:
      handlersConsumer - Consumer for managing the list of handlers.
      Returns:
      the ServerHttpSecurity.LogoutSpec to configure
      Since:
      7.0
    • logoutUrl

      public ServerHttpSecurity.LogoutSpec logoutUrl(String 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.LogoutSpec to configure
    • requiresLogout

      public ServerHttpSecurity.LogoutSpec requiresLogout(org.springframework.security.web.server.util.matcher.ServerWebExchangeMatcher requiresLogout)
      Configures when the log out will be triggered.
      Parameters:
      requiresLogout - the matcher to determine when log out is triggered
      Returns:
      the ServerHttpSecurity.LogoutSpec to configure
    • logoutSuccessHandler

      public ServerHttpSecurity.LogoutSpec logoutSuccessHandler(org.springframework.security.web.server.authentication.logout.ServerLogoutSuccessHandler handler)
    • disable

      public ServerHttpSecurity disable()
      Disables log out
      Returns:
      the ServerHttpSecurity to continue configuring
    • configure

      protected void configure(ServerHttpSecurity http)