Package org.apache.jackrabbit.api.security.user

Examples of org.apache.jackrabbit.api.security.user.User.changePassword()


            setActions(action);

            String uid = getTestPrincipal().getName();
            u = impl.createUser(uid, buildPassword(uid));

            u.changePassword("pw1");
            assertEquals(1, action.called);

            u.changePassword("pw2", "pw1");
            assertEquals(2, action.called);
        } finally {
View Full Code Here


            u = impl.createUser(uid, buildPassword(uid));

            u.changePassword("pw1");
            assertEquals(1, action.called);

            u.changePassword("pw2", "pw1");
            assertEquals(2, action.called);
        } finally {
            if (u != null) {
                u.remove();
            }
View Full Code Here

            invalid.add("WITHOUTLOWERCASE");
            invalid.add("withoutuppercase");

            for (String pw : invalid) {
                try {
                    u.changePassword(pw);
                    fail("should throw constraint violation");
                } catch (ConstraintViolationException e) {
                    // success
                }
            }
View Full Code Here

            valid.add("cDDDDDDDDDDDDDDDDD");
            valid.add("gH%%%%%%%%%%%%%%%%^^");
            valid.add("&)(*&^%23qW");

            for (String pw : valid) {
                u.changePassword(pw);
            }

        } finally {
            if (u != null) {
                u.remove();
View Full Code Here

            PasswordValidationAction pwAction = new PasswordValidationAction();
            pwAction.setConstraint("^.*(?=.{8,})(?=.*[a-z])(?=.*[A-Z]).*");
            setActions(pwAction);

            String hashed = ((UserImpl) u).buildPasswordValue("DWkej32H");
            u.changePassword(hashed);

        } finally {
            if (u != null) {
                u.remove();
            }
View Full Code Here

            throw new NotExecutableException();
        }

        User user = getTestUser(superuser);
        try {
            user.changePassword("pw");

            SimpleCredentials creds = new SimpleCredentials(user.getID(), "pw".toCharArray());
            assertTrue(((CryptedSimpleCredentials) user.getCredentials()).matches(creds));
        } finally {
            user.changePassword(oldPw);
View Full Code Here

            user.changePassword("pw");

            SimpleCredentials creds = new SimpleCredentials(user.getID(), "pw".toCharArray());
            assertTrue(((CryptedSimpleCredentials) user.getCredentials()).matches(creds));
        } finally {
            user.changePassword(oldPw);
        }
    }
}
View Full Code Here

        || !TenantUtils.isAccessibleTenant( theTenant == null ? tenantedUserNameUtils
            .getTenant( jackrabbitUser.getID() ) : theTenant ) ) {
      throw new NotFoundException( Messages.getInstance().getString(
          "AbstractJcrBackedUserRoleDao.ERROR_0003_USER_NOT_FOUND" ) );
    }
    jackrabbitUser.changePassword( password );

    /**
     * BISERVER-9906 Clear cache after changing password
     */
    purgeUserFromCache( userName );
View Full Code Here

            throw new NotExecutableException();
        }

        User user = getTestUser(superuser);
        try {
            user.changePassword("pw");

            SimpleCredentials creds = new SimpleCredentials(user.getID(), "pw".toCharArray());
            assertTrue(((CryptedSimpleCredentials) user.getCredentials()).matches(creds));
        } finally {
            user.changePassword(oldPw);
View Full Code Here

            user.changePassword("pw");

            SimpleCredentials creds = new SimpleCredentials(user.getID(), "pw".toCharArray());
            assertTrue(((CryptedSimpleCredentials) user.getCredentials()).matches(creds));
        } finally {
            user.changePassword(oldPw);
        }
    }
}
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.