Package org.jasig.portal.security

Examples of org.jasig.portal.security.PortalSecurityException


                log.info("SimpleLdapSecurityContext: Password invalid for user: " + this.myPrincipal.UID);
              } catch (Exception e) {
                log.error(
                               "SimpleLdapSecurityContext: LDAP Error with user: " +
                               this.myPrincipal.UID + "; ", e);
                throw new PortalSecurityException("SimpleLdapSecurityContext: LDAP Error" + e + " with user: " + this.myPrincipal.UID);
              } finally {
                ldapConn.releaseConnection(conn);
              }
          }
          else {
View Full Code Here


            int newUID = UserIdentityStoreFactory.getUserIdentityStoreImpl().getPortalUID(person,
                  autocreate);
            person.setID(newUID);
         } catch (AuthorizationException ae) {
            log.error("Exception retrieving ID", ae);
            throw  new PortalSecurityException("Authentication Service: Exception retrieving UID");
         }
        
         //TODO add IPerson cache
        
         // Record the successful authentication
View Full Code Here

    if (this.myOpaqueCredentials.credentialstring != null){
       for (i = 0; i < this.myOpaqueCredentials.credentialstring.length; i++)
         this.myOpaqueCredentials.credentialstring[i] = 0;
       myOpaqueCredentials.credentialstring = null;
    }
    if (error && !this.isauth) throw new PortalSecurityException("One of the security subcontexts threw an exception");
    return;
  }
View Full Code Here

      if (entry.getKey() != null && entry.getKey().equals(name))
      {
        return(entry.getCtx());
      }
    }
    PortalSecurityException ep = new PortalSecurityException("No such subcontext: " + name);
    if (log.isDebugEnabled())
        log.debug("No such subcontext as " + name, ep);
    return(null);
  }
View Full Code Here

  public synchronized void addSubContext(String name, ISecurityContext ctx)
    throws PortalSecurityException {
    // Make sure the subcontext does not already exist in the chain
    if(doesSubContextExist(name))
    {
      PortalSecurityException ep = new PortalSecurityException("Subcontext already exists: " + name);
      log.error("Subcontext already exists:" + name, ep);
      throw(ep);
    }
    else
    {
View Full Code Here

    try {
      // Retrieve the person object that is associated with the request
      person = PersonManagerFactory.getPersonManagerInstance().getPerson(request);
    } catch (Exception e) {
      log.error( "UserInstanceManager: Unable to retrieve IPerson!", e);
      throw  (new PortalSecurityException("Could not retrieve IPerson", e));
    }
   
    HttpSession session = request.getSession(false);
   
    // Return the UserInstance object if it's in the session
    UserInstance userInstance = null;
    UserInstanceHolder holder = (UserInstanceHolder)session.getAttribute(UserInstanceHolder.KEY);
    if (holder != null)
        userInstance = holder.getUserInstance();

    if (userInstance != null) {
      return  (userInstance);
    }
    // Create either a UserInstance or a GuestUserInstance
    if (person.isGuest()) {
        GuestUserInstance guestUserInstance = (GuestUserInstance) guestUserInstances.get(new Integer(person.getID()));
        if(guestUserInstance==null) {
            guestUserInstance = new GuestUserInstance(person);
            guestUserInstances.put(new Integer(person.getID()),guestUserInstance);
        }
        guestUserInstance.registerSession(request);
        userInstance = guestUserInstance;
    } else {
        if(person.getSecurityContext().isAuthenticated()) {
            userInstance = new UserInstance(person);
        } else {
            // we can't allow for unauthenticated, non-guest user to come into the system
            throw new PortalSecurityException("System does not allow for unauthenticated non-guest users.");
        }
    }
   
    if (holder == null)
        holder = new UserInstanceHolder();
View Full Code Here

        else {
            if (log.isInfoEnabled())
                log.info( "No such user: " + this.myPrincipal.UID);
        }
      } catch (Exception e) {
        PortalSecurityException ep = new PortalSecurityException("SQL Database Error");
        log.error("Error authenticating user", e);
        throw  (ep);
      }
    }
    // If the principal and/or credential are missing, the context authentication
View Full Code Here

        }
        else
            if (log.isInfoEnabled())
                log.info( "No such user: " + this.myPrincipal.UID);
      } catch (Exception e) {
        PortalSecurityException ep = new PortalSecurityException("SQL Database Error");
        log.error( "SQL database error", e);
        throw  (ep);
      }
    }
    else
View Full Code Here

        else {
            if (log.isInfoEnabled())
                log.info( "No such user: " + this.myPrincipal.UID);
        }
      } catch (Exception e) {
        PortalSecurityException ep = new PortalSecurityException("SQL Database Error");
        log.error(e,e);
        throw  (ep);
      }
    }
    else {
View Full Code Here

                        }
                    } catch (AuthenticationException ae) {
                        log.info("SimpleLdapSecurityContext: Password invalid for user: " + this.myPrincipal.UID);
                    } catch (Exception e) {
                        log.error("SimpleLdapSecurityContext: LDAP Error with user: " + this.myPrincipal.UID + "; ", e);
                        throw new PortalSecurityException("SimpleLdapSecurityContext: LDAP Error" + e
                                + " with user: " + this.myPrincipal.UID);
                    } finally {
                        ldapConn.releaseConnection(conn);
                    }
                } else {
View Full Code Here

TOP

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

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.