Class SimplePasswordStrengthChecker

    • Constructor Detail

      • SimplePasswordStrengthChecker

        public SimplePasswordStrengthChecker()
    • Method Detail

      • check

        public PasswordStrengthCheckResult check​(String userName,
                                                 String password,
                                                 List<PasswordRestriction> restictions)
        Description copied from interface: PasswordStrengthChecker
        Determines password strength. Checks and algorithm are implementation specific.
        Specified by:
        check in interface PasswordStrengthChecker
        Parameters:
        userName - - The username the password is being specified for.
        password - - password which is going to be inspected
        restictions - - adhoc password restriction list. Those will be additionally checked against password.
        Returns:
        result indicating strength of password and possible failure reasons.
      • checkRestrictions

        protected void checkRestrictions()
      • checkSymbols

        protected void checkSymbols()
      • checkDigits

        protected void checkDigits()
      • checkMiddleNonChar

        protected void checkMiddleNonChar()
      • checkAlpha

        protected void checkAlpha()
      • checkAlphaOnly

        protected void checkAlphaOnly()
      • checkNumbersOnly

        protected void checkNumbersOnly()
      • checkConsecutiveAlpha

        protected void checkConsecutiveAlpha()
      • checkConsecutiveNumbers

        protected void checkConsecutiveNumbers()
      • checkConsecutiveSymbols

        protected void checkConsecutiveSymbols()
      • checkSequential

        protected void checkSequential()
      • checkDictionary

        protected void checkDictionary()
      • getRestrictionAlpha

        public static PasswordRestriction getRestrictionAlpha​(int minAlpha)
      • getRestrictionDigit

        public static PasswordRestriction getRestrictionDigit​(int minDigit)
      • getRestrictionSymbol

        public static PasswordRestriction getRestrictionSymbol​(int minSymbol)