code: @Override
      public void logout(boolean force, String target, String message) {
          log.trace("Logging Out");
          IContextManager contextManager = ContextManager.getInstance();
  
          if (contextManager == null) {
              logout(target, message);
          } else {
              contextManager.reset(force, (response) -> {
                  if (force || !response.rejected()) {
                      logout(target, message);
                  }
              });
          }
docs: Logout out the current page instance.
  
  @param force If true, force logout without user interaction.
  @param target Optional target url for next login.
  @param message Optional message to indicate reason for logout.