public class PasswordPolicy
extends java.lang.Object
| Constructor and Description |
|---|
PasswordPolicy(boolean mustContainDigits,
boolean mustContainChars,
boolean mustContainSpecialChars,
boolean mustBeUpperLowerCase,
boolean dictionaryDeclined,
boolean charRepetitionsDeclined,
boolean allowWhitespaces,
boolean allowAlphabeticalSequence,
boolean allowNumericSequence,
boolean allowQwertySequence,
int minimumLength,
int maximumLength,
java.lang.String blacklist)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getBlacklist()
Returns the illegal charactes defined by policy.
|
int |
getMaximumLength()
Returns the maximum length of a password, as defined by the password policy.
|
int |
getMinimumLength()
Returns the minimum length of a password, as defined by the password policy.
|
boolean |
isAllowAlphabeticalSequence()
Returns whether the password policy allows passwords to contain alphabetic sequences or not.
|
boolean |
isAllowNumericSequence()
Returns whether the password policy allows passwords to contain numeric sequences or not.
|
boolean |
isAllowQwertySequence()
Returns whether the password policy allows passwords to contain QWERTY sequences or not.
|
boolean |
isAllowWhitespaces()
Returns whether the password policy allows passwords to contain whitespaces or not.
|
boolean |
isCharRepetitionsDeclined()
Returns whether the password policy allows repeating characters or numbers in the password.
|
boolean |
isDictionaryDeclined()
Returns whether the password policy allows the usage of dictionary words in passwords.
|
boolean |
isMustBeUpperLowerCase()
Returns whether the password policy requires the password to contain uppercase as well as lowercase letters.
|
boolean |
isMustContainChars()
Returns whether the password policy requires the password to contain characters or not.
|
boolean |
isMustContainDigits()
Returns whether the password policy requires the password to contain digits or not.
|
boolean |
isMustContainSpecialChars()
Returns whether if the password policy requires the password to contain special characters or not.
|
public PasswordPolicy(boolean mustContainDigits,
boolean mustContainChars,
boolean mustContainSpecialChars,
boolean mustBeUpperLowerCase,
boolean dictionaryDeclined,
boolean charRepetitionsDeclined,
boolean allowWhitespaces,
boolean allowAlphabeticalSequence,
boolean allowNumericSequence,
boolean allowQwertySequence,
int minimumLength,
int maximumLength,
java.lang.String blacklist)
mustContainDigits - Whether the password policy requires the password to contain digits or not.mustContainChars - Whether the password policy requires the password to contain characters or not.mustContainSpecialChars - Whether the password policy requires the password to contain special characters or not.mustBeUpperLowerCase - Whether the password policy requires the password to contain uppercase as well as lowercase letters.dictionaryDeclined - Whether the password policy requires the password to contain uppercase as well as lowercase letters.charRepetitionsDeclined - Whether the password policy allows repeating characters or numbers in the password.allowWhitespaces - Whether the password policy allows passwords to contain whitespaces or not.allowAlphabeticalSequence - Whether the password policy allows passwords to contains alphabetic sequences or not.allowNumericSequence - Whether the password policy allows passwords to contain numeric sequences or not.allowQwertySequence - Whether the password policy allows passwords to contain QWERTY sequences or not.minimumLength - The minimum length of a password, as defined by the password policy.maximumLength - The maximum length of a password, as defined by the password policy.blacklist - The illegal charactes defined by policy. These must not be part of any password.public boolean isMustContainDigits()
true, if the password policy requires the password to contain digits, false otherwise.public boolean isMustContainChars()
true, if the password policy requires the password to contain characters, false otherwise.public boolean isMustContainSpecialChars()
true, if the password policy requires the password to contain special characters, false otherwise.public boolean isMustBeUpperLowerCase()
true, if the password policy requires the password to contain uppercase as well as lowercase letters, false otherwise.public boolean isDictionaryDeclined()
true, if the password policy allows passwords to contain dictionary words, false otherwise.public boolean isCharRepetitionsDeclined()
true, if the password policy allows passwords to contain repeating characters or numbers, false otherwise.public boolean isAllowWhitespaces()
true, if the password policy allows passwords to contain whitespaces, false otherwise.public boolean isAllowAlphabeticalSequence()
true, if the password policy allows passwords to contain alphabetic sequences, false otherwise.public boolean isAllowNumericSequence()
true, if the password policy allows passwords to contain numeric sequences, false otherwise.public boolean isAllowQwertySequence()
true, if the password policy allows passwords to contain QWERTY sequences, false otherwise.public int getMinimumLength()
public int getMaximumLength()
public java.lang.String getBlacklist()
String containing all characters that are not allowed to be part of a password.