Package org.passay
Class IllegalSequenceRule
- java.lang.Object
-
- org.passay.IllegalSequenceRule
-
-
Field Summary
Fields Modifier and Type Field Description static int
DEFAULT_SEQUENCE_LENGTH
Default length of keyboard sequence, value is 5.static int
MINIMUM_SEQUENCE_LENGTH
Minimum length of keyboard sequence, value is 3.protected boolean
reportAllFailures
Whether to report all sequence matches or just the first.protected SequenceData
sequenceData
Sequence data for this rule.protected int
sequenceLength
Number of characters in sequence to match.protected boolean
wrapSequence
Whether or not to wrap a sequence when searching for matches.
-
Constructor Summary
Constructors Constructor Description IllegalSequenceRule(SequenceData data)
Creates a new sequence rule with the supplied list of characters.IllegalSequenceRule(SequenceData data, int sl, boolean wrap)
Creates a new sequence rule with the supplied list of characters.IllegalSequenceRule(SequenceData data, int sl, boolean wrap, boolean reportAll)
Creates a new sequence rule with the supplied list of characters.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SequenceData
getSequenceData()
Returns the sequence data for this rule.int
getSequenceLength()
Returns the sequence length for this rule.String
toString()
RuleResult
validate(PasswordData passwordData)
Validates the supplied password data per the requirements of this rule.
-
-
-
Field Detail
-
DEFAULT_SEQUENCE_LENGTH
public static final int DEFAULT_SEQUENCE_LENGTH
Default length of keyboard sequence, value is 5.- See Also:
- Constant Field Values
-
MINIMUM_SEQUENCE_LENGTH
public static final int MINIMUM_SEQUENCE_LENGTH
Minimum length of keyboard sequence, value is 3.- See Also:
- Constant Field Values
-
sequenceData
protected final SequenceData sequenceData
Sequence data for this rule.
-
sequenceLength
protected int sequenceLength
Number of characters in sequence to match.
-
wrapSequence
protected boolean wrapSequence
Whether or not to wrap a sequence when searching for matches.
-
reportAllFailures
protected boolean reportAllFailures
Whether to report all sequence matches or just the first.
-
-
Constructor Detail
-
IllegalSequenceRule
public IllegalSequenceRule(SequenceData data)
Creates a new sequence rule with the supplied list of characters.- Parameters:
data
- sequence data for this rule
-
IllegalSequenceRule
public IllegalSequenceRule(SequenceData data, int sl, boolean wrap)
Creates a new sequence rule with the supplied list of characters.- Parameters:
data
- sequence data for this rulesl
- sequence lengthwrap
- whether to wrap sequences
-
IllegalSequenceRule
public IllegalSequenceRule(SequenceData data, int sl, boolean wrap, boolean reportAll)
Creates a new sequence rule with the supplied list of characters.- Parameters:
data
- sequence data for this rulesl
- sequence lengthwrap
- whether to wrap sequencesreportAll
- whether to report all sequence matches or just the first
-
-
Method Detail
-
getSequenceLength
public int getSequenceLength()
Returns the sequence length for this rule.- Returns:
- sequence length
-
getSequenceData
public SequenceData getSequenceData()
Returns the sequence data for this rule.- Returns:
- sequence data
-
validate
public RuleResult validate(PasswordData passwordData)
Description copied from interface:Rule
Validates the supplied password data per the requirements of this rule.
-
-