Codota Logo
AuthenticationService.logout
Code IndexAdd Codota to your IDE (free)

How to use
logout
method
in
com.haulmont.cuba.security.auth.AuthenticationService

Best Java code snippets using com.haulmont.cuba.security.auth.AuthenticationService.logout (Showing top 8 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
FileOutputStream f =
  • Codota IconFile file;new FileOutputStream(file)
  • Codota IconString name;new FileOutputStream(name)
  • Codota IconFile file;new FileOutputStream(file, true)
  • Smart code suggestions by Codota
}
origin: com.haulmont.cuba/cuba-core

@Override
public void logout() {
  authenticationService.logout();
}
origin: com.haulmont.cuba/cuba-rest-api

  protected void doLogout(String sessionUUID, HttpServletResponse response) throws IOException, JSONException {
    try {
      if (authentication.begin(sessionUUID)) {
        AuthenticationService authenticationService = AppBeans.get(AuthenticationService.NAME);
        authenticationService.logout();
      }
    } catch (Throwable e) {
      log.error("Error processing logout request", e);
      response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
    }
  }
}
origin: com.haulmont.cuba/cuba-portal

@Override
public synchronized void logout() {
  try {
    authenticationService.logout();
    AppContext.setSecurityContext(null);
  } catch (Exception e) {
    log.warn("Error on logout", e);
  }
  connected = false;
  try {
    fireConnectionListeners();
  } catch (LoginException e) {
    log.warn("Error on logout", e);
  }
  session = null;
}
origin: com.haulmont.cuba/cuba-portal

protected void internalLogout() {
  if (session != null && session.isAuthenticated()) {
    authenticationService.logout();
  }
  AppContext.setSecurityContext(null);
  connected = false;
  session = null;
}
origin: com.haulmont.cuba/cuba-web-auth

authenticationService.logout();
origin: com.haulmont.cuba/cuba-rest-api

AppContext.setSecurityContext(new SecurityContext(userSession));
try {
  authenticationService.logout();
} finally {
  AppContext.setSecurityContext(null);
origin: com.haulmont.cuba/cuba-global

if (logoutRequired) {
  try {
    authenticationService.logout();
  } finally {
    AppContext.setSecurityContext(null);
origin: com.haulmont.cuba/cuba-web

@Override
public void logout() {
  backgroundWorker.checkUIAccess();
  ClientUserSession session = getSessionInternal();
  if (session == null) {
    throw new IllegalStateException("There is no active session");
  }
  if (!session.isAuthenticated()) {
    throw new IllegalStateException("Active session is not authenticated");
  }
  if (session.isAuthenticated()) {
    try {
      authenticationService.logout();
    } catch (NoUserSessionException e) {
      log.debug("An attempt to perform logout for expired session: {}", session, e);
    }
  }
  publishUserSessionFinishedEvent(session);
  UserSession previousSession = getSession();
  setSessionInternal(null);
  eventHub.unsubscribe(UserSubstitutedEvent.class);
  publishDisconnectedEvent(previousSession);
  fireStateChangeListeners(previousSession, null);
}
com.haulmont.cuba.security.authAuthenticationServicelogout

Javadoc

Log out and destroy an active user session.

Popular methods of AuthenticationService

  • login
    Authenticates a user, starts session and provides authentication details. Obtained session can be us
  • substituteUser
    Substitute a user, obtaining all its security related environment. This method replaces an active Us

Popular in Java

  • Creating JSON documents from java classes using gson
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • setContentView (Activity)
  • notifyDataSetChanged (ArrayAdapter)
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • Graphics2D (java.awt)
    This Graphics2D class extends the Graphics class to provide more sophisticated control overgraphics
  • ConnectException (java.net)
    A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
  • TimerTask (java.util)
    A task that can be scheduled for one-time or repeated execution by a Timer.
  • ReentrantLock (java.util.concurrent.locks)
    A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor
  • LogFactory (org.apache.commons.logging)
    A minimal incarnation of Apache Commons Logging's LogFactory API, providing just the common Log look
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now