Class PasswordStrengthRule

java.lang.Object
fr.becpg.repo.authentication.PasswordStrengthRule

final class PasswordStrengthRule extends Object
Security policy every password must match, whether generated or typed by the user: at least 14 characters, one uppercase letter, one lowercase letter, one digit and one special character.

A special character is any visible ASCII character that is neither a letter nor a digit, so the policy does not depend on the alphabet SecurePasswordGenerator draws from.

Author:
valentin
  • Field Details

  • Constructor Details

    • PasswordStrengthRule

      private PasswordStrengthRule()
  • Method Details

    • isSatisfiedBy

      static boolean isSatisfiedBy(String password)
      Tells whether the password matches the security policy.
      Parameters:
      password - the password to check, may be null
      Returns:
      true if the password matches the policy
    • isSpecial

      private static boolean isSpecial(int character)