robe-auth/src/main/java/io/robe/auth/AbstractAuthResource.java
public void changePassword(T user, String currentPassword, String newPassword, String newPassword2) throws AuthenticationException {

        verifyPassword(user, currentPassword);

        if (!newPassword.equals(newPassword2)) {
            throw new AuthenticationException(user.getUsername() + ": New password and re-type password must be same");
        } else if (newPassword.equals(currentPassword)) {
            throw new AuthenticationException(user.getUsername() + ": New password and old password must be different");
        }
        verifyPasswordStrength(currentPassword, newPassword, user);

        Optional<? extends UserEntry> optional = userStore.changePassword(user.getUsername(), newPassword);
        if (!optional.isPresent()) {
            throw new AuthenticationException(user.getUsername() + ": Can't update UserEntry Password");
        }
    }
public void changePassword(T user, String currentPassword, String newPassword, String newPassword2) throws AuthenticationException {

        verifyPassword(user, currentPassword);

        if (!newPassword.equals(newPassword2)) {
            throw new AuthenticationException(user.getUsername() + ": New password and re-type password must be same");
        } else if (newPassword.equals(currentPassword)) {
            throw new AuthenticationException(user.getUsername() + ": New password and old password must be different");
        }
        verifyPasswordStrength(currentPassword, newPassword, user);

        Optional<? extends UserEntry> optional = userStore.changePassword(user.getUsername(), newPassword);
        if (!optional.isPresent()) {
            throw new AuthenticationException(user.getUsername() + ": Can't update UserEntry Password");
        }
    }
public void changePassword ( T user , String currentPassword , String newPassword , String newPassword2 ) throws AuthenticationException { verifyPassword ( user , currentPassword ) ; if ( ! newPassword . equals ( newPassword2 ) ) { throw new AuthenticationException ( user . getUsername ( ) + ": New password and re-type password must be same" ) ; } else if ( newPassword . equals ( currentPassword ) ) { throw new AuthenticationException ( user . getUsername ( ) + ": New password and old password must be different" ) ; } verifyPasswordStrength ( currentPassword , newPassword , user ) ; Optional < ? extends UserEntry > optional = userStore . changePassword ( user . getUsername ( ) , newPassword ) ; if ( ! optional . isPresent ( ) ) { throw new AuthenticationException ( user . getUsername ( ) + ": Can't update UserEntry Password" ) ; } }
Changes the password for the specified user. This requires the current password, as well as
the password to replace it with. The new password should be checked against old hashes to be sure the new password does not closely resemble or equal any recent passwords for that UserEntry.
Password strength should also be verified.  This new password must be repeated to ensure that the user has typed it in correctly.

@param user            the user to change the password for
@param currentPassword the current password for the specified user
@param newPassword     the new password to use
@param newPassword2    a verification copy of the new password
@throws io.dropwizard.auth.AuthenticationException if any errors occur
Changes the password for the specified user . This requires the current password as well as the password to replace it with . The new password should be checked against old hashes to be sure the new password does not closely resemble or equal any recent passwords for that UserEntry . Password strength should also be verified . This new password must be repeated to ensure that the user has typed it in correctly .