Class OidcClientInitiatedServerLogoutSuccessHandler

java.lang.Object
org.springframework.security.oauth2.client.oidc.web.server.logout.OidcClientInitiatedServerLogoutSuccessHandler
All Implemented Interfaces:
ServerLogoutSuccessHandler

public class OidcClientInitiatedServerLogoutSuccessHandler extends Object implements ServerLogoutSuccessHandler
A reactive logout success handler for initiating OIDC logout through the user agent.
Since:
5.2
See Also:
  • Constructor Details

  • Method Details

    • onLogoutSuccess

      public reactor.core.publisher.Mono<Void> onLogoutSuccess(WebFilterExchange exchange, Authentication authentication)
      Description copied from interface: ServerLogoutSuccessHandler
      Invoked after log out was successful
      Specified by:
      onLogoutSuccess in interface ServerLogoutSuccessHandler
      Parameters:
      exchange - the exchange
      authentication - the Authentication
      Returns:
      a completion notification (success or error)
    • setPostLogoutRedirectUri

      public void setPostLogoutRedirectUri(String postLogoutRedirectUri)
      Set the post logout redirect uri template.
      The supported uri template variables are: {baseScheme}, {baseHost}, {basePort} and {basePath}.
      NOTE: {baseUrl} is also supported, which is the same as "{baseScheme}://{baseHost}{basePort}{basePath}"
              handler.setPostLogoutRedirectUri("{baseUrl}");
       
      will make so that post_logout_redirect_uri will be set to the base url for the client application.
      Parameters:
      postLogoutRedirectUri - - A template for creating the post_logout_redirect_uri query parameter
      Since:
      5.3
    • setLogoutSuccessUrl

      public void setLogoutSuccessUrl(URI logoutSuccessUrl)
      The URL to redirect to after successfully logging out when not originally an OIDC login
      Parameters:
      logoutSuccessUrl - the url to redirect to. Default is "/login?logout".