Class DefaultPasswordRequestValidator

  • All Implemented Interfaces:
    PasswordRequestValidator

    @ConfigurationProperties("broadleaf.auth.password.validator")
    public class DefaultPasswordRequestValidator
    extends Object
    implements PasswordRequestValidator
    Author:
    Nathan Moore (nathanmoore), Phillip Verheyden (phillipuniverse)
    • Method Detail

      • doesPasswordConfirmationMatch

        public boolean doesPasswordConfirmationMatch​(@Nullable
                                                     String password,
                                                     @Nullable
                                                     String pwdConfirm)
        Description copied from interface: PasswordRequestValidator
        Ensures that both the passwords match, excluding 'null' matches. In the case that both are null, this will return false;
        Specified by:
        doesPasswordConfirmationMatch in interface PasswordRequestValidator
        Parameters:
        password - what the user typed in as the password
        pwdConfirm - confirmation dialogue that the user gave
        Returns:
        true if the passwords match, false otherwise
      • isTooShort

        protected boolean isTooShort​(@Nullable
                                     String password)
      • isTooLong

        protected boolean isTooLong​(@Nullable
                                    String password)
      • hasUppercase

        protected boolean hasUppercase​(@Nullable
                                       String password)
      • hasLowercase

        protected boolean hasLowercase​(@Nullable
                                       String password)
      • hasNoWhitespaces

        protected boolean hasNoWhitespaces​(@Nullable
                                           String password)
      • hasSpecialChar

        protected boolean hasSpecialChar​(@Nullable
                                         String password)
      • hasDigit

        protected boolean hasDigit​(@Nullable
                                   String password)
      • matchesCustomRegex

        protected boolean matchesCustomRegex​(@Nullable
                                             String password)