Package org.apache.jetspeed.services.security

Examples of org.apache.jetspeed.services.security.UnknownUserException


        }
        if ( users.size() == 1 )
        {
            return (JetspeedUser)users.get(0);
        }
        throw new UnknownUserException("Unknown user '" + principal.getName() + "'");

    }
View Full Code Here


    public void saveUser(JetspeedUser user)
        throws JetspeedSecurityException
    {
        if(!accountExists(user, true))
        {
            throw new UnknownUserException("Cannot save user '" + user.getUserName() +
                                           "', User doesn't exist");
        }
        Criteria criteria = TurbineUserPeer.buildCriteria(user);
        try
        {
View Full Code Here

        newPassword = JetspeedSecurity.convertPassword(newPassword);

        String encrypted = JetspeedSecurity.encryptPassword(oldPassword);
        if(!accountExists(user))
        {
            throw new UnknownUserException(Localization.getString("UPDATEACCOUNT_NOUSER"));
        }
        if(!user.getPassword().equals(encrypted))
        {
            throw new UserException(Localization.getString("UPDATEACCOUNT_BADOLDPASSWORD"));
        }
View Full Code Here

    public void forcePassword( JetspeedUser user, String password )
        throws JetspeedSecurityException
    {
        if(!accountExists(user))
        {
            throw new UnknownUserException("The account '" +
                user.getUserName() + "' does not exist");
        }
        user.setPassword(JetspeedSecurity.encryptPassword(password));
        // save the changes in the database immediately, to prevent the
        // password being 'reverted' to the old value if the user data
View Full Code Here

                    roles.add(new LDAPRole((LDAPURL) (((Vector)enum1.nextElement()).firstElement())));
                }
            }
            else
            {
                throw new UnknownUserException("No role ");
            }
        }
        catch(Exception e)
        {
            throw new RoleException("Failed to retrieve roles ", e);
View Full Code Here

                    groups.add(new LDAPGroup((LDAPURL) (((Vector)enum1.nextElement()).firstElement())));
                }
            }
            else
            {
                throw new UnknownUserException("No groups");
            }
        }
        catch(Exception e)
        {
            throw new GroupException("Failed to retrieve groups ", e);
View Full Code Here

        {
            throw new UserException("Multiple Users with same username '" + principal.getName() + "'");
        }
        else
        {
            throw new UnknownUserException("Unknown user '" + principal.getName() + "'");
        }
    }
View Full Code Here

    public void saveUser(JetspeedUser user)
        throws JetspeedSecurityException
    {
        if(!accountExists(user, true))
        {
            throw new UnknownUserException("Cannot save user '" + user.getUserName() +
                                           "', User doesn't exist");
        }
        try
        {
            ((LDAPUser)user).update(false);
View Full Code Here

        oldPassword = JetspeedSecurity.convertPassword(oldPassword);
        newPassword = JetspeedSecurity.convertPassword(newPassword);

        if(!accountExists(user))
        {
            throw new UnknownUserException("The account '" +
                user.getUserName() + "' does not exist");
        }
        else if (!passwordsMatch(user, oldPassword))
        {
            throw new UserException(
View Full Code Here

    public void forcePassword( JetspeedUser user, String password )
        throws JetspeedSecurityException
    {
        if(!accountExists(user))
        {
            throw new UnknownUserException("The account '" +
                user.getUserName() + "' does not exist");
        }

        String encrypted = JetspeedSecurity.encryptPassword( password );
        user.setPassword(encrypted);
View Full Code Here

TOP

Related Classes of org.apache.jetspeed.services.security.UnknownUserException

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.