Package com.netscape.cms.password
Class PasswordChecker
- java.lang.Object
-
- com.netscape.cms.password.PasswordChecker
-
- All Implemented Interfaces:
IConfigPasswordCheck,IPasswordCheck
public class PasswordChecker extends java.lang.Object implements IPasswordCheck, IConfigPasswordCheck
This class checks the given password if it meets the specific requirements. For example, it can also specify the format of the password which has to be 8 characters long and must be in alphanumeric.- Version:
- $Revision$, $Date$
-
-
Field Summary
Fields Modifier and Type Field Description static intMIN_LEN
-
Constructor Summary
Constructors Constructor Description PasswordChecker()Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetConfigReason(java.lang.String mPassword)Returns a reason if the password doesnt meet the quality requirement.java.lang.StringgetReason(java.lang.String mPassword)Returns a reason if the password doesnt meet the quality requirement.booleanisGoodConfigPassword(java.lang.String mPassword)Check if the password meets the quality requirementbooleanisGoodPassword(java.lang.String mPassword)Returns true if the given password meets the quality requirement; otherwise returns false.
-
-
-
Field Detail
-
MIN_LEN
public static final int MIN_LEN
- See Also:
- Constant Field Values
-
-
Method Detail
-
isGoodConfigPassword
public boolean isGoodConfigPassword(java.lang.String mPassword)
Description copied from interface:IConfigPasswordCheckCheck if the password meets the quality requirement- Specified by:
isGoodConfigPasswordin interfaceIConfigPasswordCheck- Parameters:
mPassword- the given password- Returns:
- true if the password meets the quality requirement; otherwise false
-
getConfigReason
public java.lang.String getConfigReason(java.lang.String mPassword)
Description copied from interface:IConfigPasswordCheckReturns a reason if the password doesnt meet the quality requirement.- Specified by:
getConfigReasonin interfaceIConfigPasswordCheck- Parameters:
mPassword- the given password- Returns:
- a reason if the password quality requirement is not met.
-
isGoodPassword
public boolean isGoodPassword(java.lang.String mPassword)
Returns true if the given password meets the quality requirement; otherwise returns false.- Specified by:
isGoodPasswordin interfaceIPasswordCheck- Parameters:
mPassword- The given password being checked.- Returns:
- true if the password meets the quality requirement; otherwise returns false.
-
getReason
public java.lang.String getReason(java.lang.String mPassword)
Returns a reason if the password doesnt meet the quality requirement.- Specified by:
getReasonin interfaceIPasswordCheck- Parameters:
mPassword- the given password- Returns:
- string as a reason if the password quality requirement is not met.
-
-