Class DefaultRegistrationValidator
java.lang.Object
com.broadleafcommerce.auth.user.validation.DefaultRegistrationValidator
- All Implemented Interfaces:
RegistrationValidator
- Author:
- Phillip Verheyden (phillipuniverse)
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultRegistrationValidator(PasswordRequestValidator passwordValidator, AuthRegistrationProperties authRegistrationProperties) -
Method Summary
Modifier and TypeMethodDescriptionprotected AuthRegistrationPropertiesprotected PasswordRequestValidatorprotected StringprefixWithEntityValidationMessageKey(String errorCode) voidvalidate(UserRegistration registration, org.springframework.validation.Errors errors) protected voidvalidatePasswordConfirmation(UserRegistration registration, org.springframework.validation.Errors errors) protected voidvalidateUserType(UserRegistration registration, org.springframework.validation.Errors errors) Validate theUserRegistration.getUserType().
-
Constructor Details
-
DefaultRegistrationValidator
public DefaultRegistrationValidator(PasswordRequestValidator passwordValidator, AuthRegistrationProperties authRegistrationProperties)
-
-
Method Details
-
validate
- Specified by:
validatein interfaceRegistrationValidator
-
validateUserType
protected void validateUserType(UserRegistration registration, org.springframework.validation.Errors errors) Validate theUserRegistration.getUserType(). By default, this disallows all user types other thanUserType.CUSTOMERfor security purposes. For example, we don't want to allow someone to create a newUserType.ADMINuser through the registration flow.- Parameters:
registration- the user registration to validateerrors- the errors object on which to register validation errors
-
validatePasswordConfirmation
protected void validatePasswordConfirmation(UserRegistration registration, org.springframework.validation.Errors errors) -
prefixWithEntityValidationMessageKey
-
getPasswordValidator
-
getAuthRegistrationProperties
-