public class DefaultChangePasswordFormValidator extends Object implements ChangePasswordFormValidator
Constructor and Description |
---|
DefaultChangePasswordFormValidator(PasswordRequestValidator passwordValidator,
org.springframework.security.crypto.password.PasswordEncoder passwordEncoder) |
Modifier and Type | Method and Description |
---|---|
void |
validate(User currentUser,
ChangePasswordForm changePasswordForm,
org.springframework.validation.Errors errors)
Verifies that all of the supplied fields in the given
ChangePasswordForm are correct,
placing any errors into the given Errors . |
public DefaultChangePasswordFormValidator(PasswordRequestValidator passwordValidator, org.springframework.security.crypto.password.PasswordEncoder passwordEncoder)
public void validate(@NonNull User currentUser, @NonNull ChangePasswordForm changePasswordForm, @NonNull org.springframework.validation.Errors errors)
ChangePasswordFormValidator
ChangePasswordForm
are correct,
placing any errors into the given Errors
.validate
in interface ChangePasswordFormValidator
currentUser
- this should be the current (already authenticated) user who is attempting
to change their passwordchangePasswordForm
- the change password form, as submitted by the usererrors
- the errors object in which any validation errors should be registeredCopyright © 2021. All rights reserved.