Examples of signOffAndClear()


Examples of org.olat.core.util.UserSession.signOffAndClear()

      if (!auth ||   !ureq.isValidDispatchURI()) {
        // String lang =
        // I18nManager.getInstance().getDefaultLocale().toString();
        Identity ident = ManagerFactory.getManager().findIdentityByName("administrator");

        usess.signOffAndClear();
        usess.setIdentity(ident);
        usess.setRoles(new Roles(true, true, true, true, false, true));
        usess.setLocale(I18nManager.getInstance().getLocaleOrDefault(ident.getUser().getPreferences().getLanguage()));

        // brasato:: was
View Full Code Here

Examples of org.olat.core.util.UserSession.signOffAndClear()

          // probably valid framework link from previous user && new Session(no window):
          // when a previous user logged off, and 30min later (when the httpsession is invalidated), the next user clicks e.g. on
          // the log-in link in the -same- browser window ->
          // -> there is no window -> create a new one
          window = null;
          usess.signOffAndClear();
          // request new windows since it is a new usersession, the old one was purged
          ws = Windows.getWindows(usess);
        } else {
          if (validDispatchUri) {
            window = ws.getWindow(ureq);
View Full Code Here

Examples of org.olat.core.util.UserSession.signOffAndClear()

          if (validDispatchUri) {
            window = ws.getWindow(ureq);
          } else {
            // e.g. /dmz/ -> start screen, clear previous session data
            window = null;
            usess.signOffAndClear();
            // request new windows since it is a new usersession, the old one was purged
            ws = Windows.getWindows(usess);
          }
        }
       
View Full Code Here

Examples of org.olat.core.util.UserSession.signOffAndClear()

    // if the user sending the cookie did not log out and we are logging in
    // again, then we need to make sure everything is cleaned up. we cleanup in all cases.
    UserSession usess = ureq.getUserSession();
    // prepare for a new user: clear all the instance vars of the userSession
    // note: does not invalidate the session, since it is reused
    usess.signOffAndClear();
    // init the UserSession for the new User
    // we can set the identity and finish the log in process
    usess.setIdentity(identity);
    setRolesFor(identity, usess);
   
View Full Code Here

Examples of org.olat.core.util.UserSession.signOffAndClear()

   
    // check if loginDenied or maxSession (only for non-admin)
    if ( (loginBlocked && !usess.getRoles().isOLATAdmin())
        || ( ((maxSessions != MAX_SESSION_NO_LIMIT) && (UserSession.getUserSessionsCnt() >= maxSessions)) && !usess.getRoles().isOLATAdmin() ) ) {
      Tracing.logAudit("Login was blocked for username=" + usess.getIdentity().getName() + ", loginBlocked=" + loginBlocked + " NbrOfSessions=" + UserSession.getUserSessionsCnt() , AuthHelper.class);
      usess.signOffAndClear();
      return LOGIN_NOTAVAILABLE;
    }
   
    // set authprovider
    //usess.getIdentityEnvironment().setAuthProvider(authProvider);
View Full Code Here

Examples of org.olat.core.util.UserSession.signOffAndClear()

          // probably valid framework link from previous user && new Session(no window):
          // when a previous user logged off, and 30min later (when the httpsession is invalidated), the next user clicks e.g. on
          // the log-in link in the -same- browser window ->
          // -> there is no window -> create a new one
          window = null;
          usess.signOffAndClear();
          usess.setLocale(LocaleNegotiator.getPreferedLocale(ureq));
          // request new windows since it is a new usersession, the old one was purged
          ws = Windows.getWindows(usess);
        } else {
          if (validDispatchUri) {
View Full Code Here

Examples of org.olat.core.util.UserSession.signOffAndClear()

          if (validDispatchUri) {
            window = ws.getWindow(ureq);
          } else {
            // e.g. /dmz/ -> start screen, clear previous session data
            window = null;
            usess.signOffAndClear();
            usess.setLocale(LocaleNegotiator.getPreferedLocale(ureq));
            // request new windows since it is a new usersession, the old one was purged
            ws = Windows.getWindows(usess);
          }
        }
View Full Code Here

Examples of org.olat.core.util.UserSession.signOffAndClear()

            // In this example, we simply check
            // that neither field is blank
            Identity identity = WebDAVAuthManager.authenticate(userID, password);
            if (identity != null) {
              usess = UserSession.getUserSession(request);
              usess.signOffAndClear();
              usess.setIdentity(identity);
              UserDeletionManager.getInstance().setIdentityAsActiv(identity);
              // set the roles (admin, author, guest)
              Roles roles = ManagerFactory.getManager().getRoles(identity);
              usess.setRoles(roles);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.