Examples of changePassword()


Examples of org.nxplanner.security.LoginModule.changePassword()

        String newPassword = personForm.getNewPassword();
        if (StringUtils.isNotEmpty(newPassword)) {
            LoginModule loginModule = AuthenticatorImpl.getLoginModule(request);
            if (loginModule != null) {
                try {
                    loginModule.changePassword(personForm.getUserId(), personForm.getNewPassword());
                } catch (AuthenticationException e) {
                    throw new ServletException(e);
                }
            }
        }
View Full Code Here

Examples of org.rhq.enterprise.server.auth.SubjectManagerLocal.changePassword()

                return returnFailure(request, mapping, ParamConstants.USER_PARAM, pForm.getId());
            }
        }

        String newPassword = pForm.getNewPassword();
        subjectManager.changePassword(subject, userName, newPassword);

        // when we have arrived here, the password is changed.
        // If this was a change of our own password, we need to re-login now
        if (isSameUser) {
            subjectManager.logout(subject.getSessionId());
View Full Code Here

Examples of org.rhq.enterprise.server.auth.SubjectManagerLocal.changePassword()

        assert new_user.getId() != 0;
        Subject login_new_user = subjectManager.loginUnauthenticated(new_user.getName());
        assert login_new_user.equals(new_user);
        new_user = login_new_user; // login_new_user was given a new session ID

        subjectManager.changePassword(new_user, new_user.getName(), "my-new-password");
        subjectManager.changePassword(rhqadmin, new_user.getName(), "my-new-password"); // see that rhqadmin can change it too

        getTransactionManager().commit();
        getTransactionManager().begin();
View Full Code Here

Examples of org.rhq.enterprise.server.auth.SubjectManagerLocal.changePassword()

        Subject login_new_user = subjectManager.loginUnauthenticated(new_user.getName());
        assert login_new_user.equals(new_user);
        new_user = login_new_user; // login_new_user was given a new session ID

        subjectManager.changePassword(new_user, new_user.getName(), "my-new-password");
        subjectManager.changePassword(rhqadmin, new_user.getName(), "my-new-password"); // see that rhqadmin can change it too

        getTransactionManager().commit();
        getTransactionManager().begin();

        try {
View Full Code Here

Examples of org.rhq.enterprise.server.auth.SubjectManagerLocal.changePassword()

        getTransactionManager().commit();
        getTransactionManager().begin();

        try {
            subjectManager.changePassword(new_user, rhqadmin.getName(), "not-allowed");
            assert false : "The new user does not have permission to change another's password";
        } catch (PermissionException se) {
        } finally {
            // PermissionException causes a rollback, let's start a new tx
            getTransactionManager().rollback();
View Full Code Here

Examples of org.sonatype.security.usermanagement.UserManager.changePassword()

  {
    User user = this.getUser(userId);

    try {
      UserManager userManager = userManagerFacade.getUserManager(user.getSource());
      userManager.changePassword(userId, newPassword);
    }
    catch (NoSuchUserManagerException e) {
      // this should NEVER happen
      this.logger.warn("User '" + userId + "' with source: '" + user.getSource()
          + "' but could not find the UserManager for that source.");
View Full Code Here

Examples of org.xwiki.test.ui.administration.elements.PreferencesUserProfilePage.changePassword()

    @Test
    public void testChangePassword()
    {
        // Change the password
        PreferencesUserProfilePage preferencesPage = this.customProfilePage.switchToPreferences();
        ChangePasswordPage changePasswordPage = preferencesPage.changePassword();
        String newPassword = RandomStringUtils.randomAlphanumeric(6);
        changePasswordPage.changePassword(newPassword, newPassword);
        changePasswordPage.submit();

        // Logout
View Full Code Here

Examples of org.xwiki.test.ui.administration.elements.PreferencesUserProfilePage.changePassword()

    @Test
    public void testChangePasswordWithTwoDifferentPasswords()
    {
        PreferencesUserProfilePage preferencesPage = this.customProfilePage.switchToPreferences();
        ChangePasswordPage changePasswordPage = preferencesPage.changePassword();
        changePasswordPage.changePassword(PASSWORD_1, PASSWORD_2);
        changePasswordPage.submit();
        Alert alert = getDriver().switchTo().alert();
        Assert.assertEquals(PASSWORD_MISMATCH, alert.getText());
        alert.accept();
View Full Code Here

Examples of org.xwiki.test.ui.administration.elements.PreferencesUserProfilePage.changePassword()

    @Test
    public void testChangePasswordWithoutEnteringPasswords()
    {
        PreferencesUserProfilePage preferencesPage = this.customProfilePage.switchToPreferences();
        ChangePasswordPage changePasswordPage = preferencesPage.changePassword();
        changePasswordPage.submit();
        Alert alert = getDriver().switchTo().alert();
        Assert.assertEquals(PASSWORD_IS_EMPTY, alert.getText());
        alert.accept();
    }
View Full Code Here

Examples of org.xwiki.test.ui.administration.elements.PreferencesUserProfilePage.changePassword()

    {
        // Login as Admin and change the password of another user
        getUtil().getURLToLoginAsAdminAndGotoPage(this.customProfilePage.getURL());
        getUtil().recacheSecretToken();
        PreferencesUserProfilePage preferencesPage = this.customProfilePage.switchToPreferences();
        ChangePasswordPage changePasswordPage = preferencesPage.changePassword();
        changePasswordPage.changePassword(PASSWORD_1, PASSWORD_2);
        changePasswordPage.submit();
        Alert alert = getDriver().switchTo().alert();
        Assert.assertEquals(PASSWORD_MISMATCH, alert.getText());
        alert.accept();
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.