Class DefaultChangePasswordFormValidator

    • Constructor Detail

      • DefaultChangePasswordFormValidator

        public DefaultChangePasswordFormValidator​(PasswordRequestValidator passwordValidator,
                                                  org.springframework.security.crypto.password.PasswordEncoder passwordEncoder)
    • Method Detail

      • validate

        public void validate​(@NonNull
                             User currentUser,
                             @NonNull
                             ChangePasswordForm changePasswordForm,
                             @NonNull
                             org.springframework.validation.Errors errors)
        Description copied from interface: ChangePasswordFormValidator
        Verifies that all of the supplied fields in the given ChangePasswordForm are correct, placing any errors into the given Errors.
        Specified by:
        validate in interface ChangePasswordFormValidator
        Parameters:
        currentUser - this should be the current (already authenticated) user who is attempting to change their password
        changePasswordForm - the change password form, as submitted by the user
        errors - the errors object in which any validation errors should be registered