Class DefaultResetPasswordFormValidator<P extends PasswordToken>
- java.lang.Object
-
- com.broadleafcommerce.auth.user.validation.DefaultResetPasswordFormValidator<P>
-
- All Implemented Interfaces:
ResetPasswordFormValidator<P>
public class DefaultResetPasswordFormValidator<P extends PasswordToken> extends Object implements ResetPasswordFormValidator<P>
- Author:
- Nathan Moore (nathanmoore).
-
-
Field Summary
Fields Modifier and Type Field Description static String
PASSWORD_FIELD
protected PasswordTokenValidator<P>
passwordTokenValidator
protected PasswordRequestValidator
passwordValidator
protected UsernameValidator
usernameValidator
-
Constructor Summary
Constructors Constructor Description DefaultResetPasswordFormValidator(UsernameValidator usernameValidator, PasswordRequestValidator passwordValidator, PasswordTokenValidator<P> passwordTokenValidator)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
validate(List<P> passwordTokens, ResetPasswordForm resetPasswordForm, org.springframework.validation.Errors errors)
Validates a password reset form.
-
-
-
Field Detail
-
usernameValidator
protected final UsernameValidator usernameValidator
-
passwordValidator
protected final PasswordRequestValidator passwordValidator
-
passwordTokenValidator
protected final PasswordTokenValidator<P extends PasswordToken> passwordTokenValidator
-
PASSWORD_FIELD
public static final String PASSWORD_FIELD
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
DefaultResetPasswordFormValidator
public DefaultResetPasswordFormValidator(UsernameValidator usernameValidator, PasswordRequestValidator passwordValidator, PasswordTokenValidator<P> passwordTokenValidator)
-
-
Method Detail
-
validate
public void validate(List<P> passwordTokens, ResetPasswordForm resetPasswordForm, @NonNull org.springframework.validation.Errors errors)
Description copied from interface:ResetPasswordFormValidator
Validates a password reset form. When resetting a password, this is where validation of password requirements should be performed.- Specified by:
validate
in interfaceResetPasswordFormValidator<P extends PasswordToken>
- Parameters:
passwordTokens
- A list of password tokens belonging to a user.resetPasswordForm
- The reset password formerrors
- An errors object to populate if validation fails.- See Also:
PasswordToken.getUserId()
-
-