public class SimplePasswordStrengthChecker extends Object implements PasswordStrengthChecker
Modifier and Type | Field and Description |
---|---|
protected static int |
ALPHA_ONLY_WEIGHT |
protected static int |
ALPHA_WEIGHT |
protected static int |
CONSECUTIVE_ALPHA_WEIGHT |
protected static int |
CONSECUTIVE_DIGITS_WEIGHT |
protected static int |
CONSECUTIVE_SYMBOLS_WEIGHT |
protected static int |
DICTIONARY_WORD_WEIGHT |
protected static int |
DIGITS_ONLY_WEIGHT |
protected static int |
DIGITS_WEIGHT |
protected static int |
MIDDLE_NONCHAR_WEIGHT |
protected static int |
PWD_LEN_WEIGHT |
static String |
REGEX_ALPHA |
static String |
REGEX_ALPHA_LC |
static String |
REGEX_ALPHA_UC |
static String |
REGEX_DIGITS |
static String |
REGEX_SYMBOLS |
protected static int |
REQUIREMENTS_WEIGHT |
protected static int |
SEQUENTIAL_WEIGHT |
protected static int |
SYMBOLS_WEIGHT |
Constructor and Description |
---|
SimplePasswordStrengthChecker() |
SimplePasswordStrengthChecker(List<PasswordRestriction> initRestrictions,
Dictionary dictionary,
Keyboard keyboard) |
Modifier and Type | Method and Description |
---|---|
PasswordStrengthCheckResult |
check(String userName,
String password,
List<PasswordRestriction> restictions)
Determines password strength.
|
protected void |
checkAlpha() |
protected void |
checkAlphaOnly() |
protected void |
checkConsecutiveAlpha() |
protected void |
checkConsecutiveNumbers() |
protected void |
checkConsecutiveSymbols() |
protected void |
checkDictionary() |
protected void |
checkDigits() |
protected void |
checkMiddleNonChar() |
protected void |
checkNumbersOnly() |
protected void |
checkRestrictions() |
protected void |
checkSequential() |
protected void |
checkSymbols() |
static PasswordRestriction |
getRestrictionAlpha(int minAlpha) |
static PasswordRestriction |
getRestrictionDigit(int minDigit) |
static PasswordRestriction |
getRestrictionSymbol(int minSymbol) |
public static final String REGEX_DIGITS
public static final String REGEX_SYMBOLS
public static final String REGEX_ALPHA_UC
public static final String REGEX_ALPHA_LC
public static final String REGEX_ALPHA
protected static final int PWD_LEN_WEIGHT
protected static final int REQUIREMENTS_WEIGHT
protected static final int SYMBOLS_WEIGHT
protected static final int DIGITS_WEIGHT
protected static final int MIDDLE_NONCHAR_WEIGHT
protected static final int ALPHA_WEIGHT
protected static final int ALPHA_ONLY_WEIGHT
protected static final int DIGITS_ONLY_WEIGHT
protected static final int CONSECUTIVE_ALPHA_WEIGHT
protected static final int CONSECUTIVE_DIGITS_WEIGHT
protected static final int CONSECUTIVE_SYMBOLS_WEIGHT
protected static final int DICTIONARY_WORD_WEIGHT
protected static final int SEQUENTIAL_WEIGHT
public SimplePasswordStrengthChecker()
public SimplePasswordStrengthChecker(List<PasswordRestriction> initRestrictions, Dictionary dictionary, Keyboard keyboard)
public PasswordStrengthCheckResult check(String userName, String password, List<PasswordRestriction> restictions)
PasswordStrengthChecker
check
in interface PasswordStrengthChecker
userName
- - The username the password is being specified for.password
- - password which is going to be inspectedrestictions
- - adhoc password restriction list. Those will be additionally checked against password.protected void checkRestrictions()
protected void checkSymbols()
protected void checkDigits()
protected void checkMiddleNonChar()
protected void checkAlpha()
protected void checkAlphaOnly()
protected void checkNumbersOnly()
protected void checkConsecutiveAlpha()
protected void checkConsecutiveNumbers()
protected void checkConsecutiveSymbols()
protected void checkSequential()
protected void checkDictionary()
public static PasswordRestriction getRestrictionAlpha(int minAlpha)
public static PasswordRestriction getRestrictionDigit(int minDigit)
public static PasswordRestriction getRestrictionSymbol(int minSymbol)
Copyright © 2023 JBoss by Red Hat. All rights reserved.