|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.vt.middleware.password.UsernameRule
public class UsernameRule
Rule for determining if a password contains the username associated with that password.
| Field Summary | |
|---|---|
static String |
ERROR_CODE
Error code for matching username. |
static String |
ERROR_CODE_REVERSED
Error code for matching reversed dictionary word. |
| Constructor Summary | |
|---|---|
UsernameRule()
Default constructor. |
|
UsernameRule(boolean mb,
boolean ic)
Create a new username rule. |
|
| Method Summary | |
|---|---|
protected Map<String,?> |
createRuleResultDetailParameters(String username)
Creates the parameter data for the rule result detail. |
boolean |
isIgnoreCase()
Returns whether to ignore the case of the username. |
boolean |
isMatchBackwards()
Returns whether to match the username backwards. |
void |
setIgnoreCase(boolean b)
Sets whether the verify method will ignore case when searching the for a username. |
void |
setMatchBackwards(boolean b)
Sets whether the verify method will search the password for the username spelled backwards as well as forwards. |
String |
toString()
Returns a string representation of this object. |
RuleResult |
validate(PasswordData passwordData)
Validates the supplied password data per the requirements of this rule. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String ERROR_CODE
public static final String ERROR_CODE_REVERSED
| Constructor Detail |
|---|
public UsernameRule()
public UsernameRule(boolean mb,
boolean ic)
mb - whether to match backwardsic - whether to ignore case| Method Detail |
|---|
public void setMatchBackwards(boolean b)
b - whether to match username backwardspublic boolean isMatchBackwards()
public void setIgnoreCase(boolean b)
b - whether to ignore casepublic boolean isIgnoreCase()
public RuleResult validate(PasswordData passwordData)
validate in interface RulepasswordData - to verify (not null).
protected Map<String,?> createRuleResultDetailParameters(String username)
username - matching username
public String toString()
toString in class Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||