Package org.jasig.portal.security

Examples of org.jasig.portal.security.IPersonManager


            }
           
            return;
        }
       
        final IPersonManager personManager = PersonManagerLocator.getPersonManager();

        // Update the session timeout for an unauthenticated user.
        final IPerson person = personManager.getPerson(writableRequest);
        if (person != null && !person.getSecurityContext().isAuthenticated()) {

            if (unauthenticatedUserSessionTimeout != 0) {
                session.setMaxInactiveInterval(unauthenticatedUserSessionTimeout);
               
View Full Code Here


        request.setCharacterEncoding("UTF-8");
    } catch (UnsupportedEncodingException uee) {
        log.error("Unable to set UTF-8 character encoding!", uee);
    }

    final IPersonManager personManager = PersonManagerFactory.getPersonManagerInstance();
   
    // Clear out the existing session for the user if they have one
    String targetUid = null;
    String originalUid = null;
    boolean swap = false;
    if (request.isRequestedSessionIdValid()) {
      try {
            HttpSession s = request.getSession(false);
          //Check if this is a swapped user hitting the Login servlet
          originalUid = (String)s.getAttribute(SWAP_ORIGINAL_UID);

          //No original person in session so check for swap request
          if (originalUid == null) {
              targetUid = (String)s.getAttribute(SWAP_TARGET_UID);
              if (targetUid != null) {
                  final IPerson person = personManager.getPerson(request);
                  originalUid = person.getName();
                  swap = true;
              }
          }
          else {
              final IPerson person = personManager.getPerson(request);
              targetUid = person.getName();
          }

            s.invalidate();
      } catch (IllegalStateException ise) {
        // ISE indicates session was already invalidated.
        // This is fine.  This servlet trying to guarantee that the session has been invalidated;
        // it doesn't have to insist that it is the one that invalidated it.
        if (log.isTraceEnabled()) {
          log.trace("LoginServlet attempted to invalidate an already invalid session.", ise);
        }
      }
    }

    //  Create the user's session
    HttpSession s = request.getSession(true);
   
    IPerson person = null;
    try {
        final HashMap principals;
        final HashMap credentials;
       
        // Get the person object associated with the request
        person = personManager.getPerson(request);
       
        //If doing an identity swap
        if (targetUid != null && originalUid != null) {
            if (swap) {
                swapperLog.warn("Swapping identity for '" + originalUid + "' to '" + targetUid + "'");
View Full Code Here

TOP

Related Classes of org.jasig.portal.security.IPersonManager

Copyright © 2018 www.massapicom. 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.