Package org.rhq.enterprise.server.auth

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


        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

        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

        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

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.