Class OidcClientInitiatedLogoutSuccessHandler

java.lang.Object
com.codename1.backend.security.OidcClientInitiatedLogoutSuccessHandler
All Implemented Interfaces:
LogoutSuccessHandler

public final class OidcClientInitiatedLogoutSuccessHandler extends Object implements LogoutSuccessHandler

After a local sign-out, sends a user who signed in with OpenID Connect to the provider's end-session endpoint (OpenID Connect RP-Initiated Logout), with the ID token as id_token_hint, so the provider's session ends too. A user who signed in any other way, or whose provider has no such endpoint, goes where next sends them.

http.oidcLogout(o -> o.clientInitiated("{baseUrl}/"));
  • Constructor Details

  • Method Details

    • setPostLogoutRedirectUri

      public void setPostLogoutRedirectUri(String postLogoutRedirectUri)
      Where the provider sends the user back to, which must be registered with it; {baseUrl} stands for this server's scheme and host. Unset, none is sent and the provider shows its own page.
    • onLogoutSuccess

      public HttpServer.Response onLogoutSuccess(HttpServer.Request request, Authentication authentication) throws Exception
      Specified by:
      onLogoutSuccess in interface LogoutSuccessHandler
      Parameters:
      authentication - who signed out; null when nobody was signed in
      Throws:
      Exception