|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.opengts.db.GeneralPasswordHandler
public class GeneralPasswordHandler
Nested Class Summary | |
---|---|
static class |
GeneralPasswordHandler.PasswordEncodingException
|
Field Summary | |
---|---|
static java.lang.String[] |
ARG_ENCODING
|
static java.lang.String[] |
ARG_MINALPHA
|
static java.lang.String[] |
ARG_MINDIGIT
|
static java.lang.String[] |
ARG_MINLEN
|
static java.lang.String[] |
ARG_MINLOWER
|
static java.lang.String[] |
ARG_MINSPEC
|
static java.lang.String[] |
ARG_MINUPPER
|
static java.lang.String[] |
ARG_PASSWORD
|
static java.lang.String[] |
ARG_TBLPASS
|
static java.lang.String |
ENC_MD5
|
static java.lang.String |
ENC_MD5PLAIN
|
static java.lang.String |
ENC_PLAIN
|
static java.lang.String |
ENC_PLAINMD5
|
static int |
MD5_HASH_LEN
|
static java.lang.String |
PROP_debugCheckPassword
|
static java.lang.String |
PROP_maximumPasswordAgeSeconds
|
static java.lang.String |
PROP_minimumAlphaChars
|
static java.lang.String |
PROP_minimumCategories
|
static java.lang.String |
PROP_minimumDigitChars
|
static java.lang.String |
PROP_minimumLowerAlphaChars
|
static java.lang.String |
PROP_minimumNonAlphaChars
|
static java.lang.String |
PROP_minimumPasswordLength
|
static java.lang.String |
PROP_minimumSpecialChars
|
static java.lang.String |
PROP_minimumUpperAlphaChars
|
static java.lang.String |
PROP_passwordEncoding
|
static java.lang.String |
PROP_passwordFormatDescription
|
static java.lang.String |
PROP_specialCharacters
|
Constructor Summary | |
---|---|
GeneralPasswordHandler()
Default Constructor |
|
GeneralPasswordHandler(RTProperties rtp)
Constructor |
|
GeneralPasswordHandler(java.lang.String name,
RTProperties rtp)
Constructor |
Method Summary | |
---|---|
boolean |
checkHash()
Returns true if encoding if "md5" should be checked |
boolean |
checkPassword(java.lang.String enteredPass,
java.lang.String tablePass)
Check entered password against stored password |
boolean |
checkPlain()
Returns true if plain-text password should be checked |
java.lang.String |
decodePassword(java.lang.String pass)
Decode password |
java.lang.String |
encodePassword(java.lang.String pass)
Encode password |
protected boolean |
getBoolean(java.lang.String key,
boolean dft)
Returns the value of the Long property key |
boolean |
getDebugCheckPassword()
Gets debug logging for "checkPassword" |
java.lang.String |
getEncoding()
Returns the encoding used for this PasswordHandler |
java.lang.String |
getEncodingString()
Returns the encoding as a displayable string (this differs from "getEncoding()" in that if the encoding was originally "md5plain", then the returned string will be "md5plain" - where "getEncoding()" would just return "md5") |
protected int |
getInt(java.lang.String key,
int dft)
Returns the value of the Long property key |
protected long |
getLong(java.lang.String key,
long dft)
Returns the value of the Long property key |
java.lang.String |
getName()
Gets the name of this PasswordHandler |
java.lang.String |
getPasswordFormatDescription(java.util.Locale locale)
Returns a text description of the valid characters alowed for a password |
protected java.lang.Object |
getProperty(java.lang.String key,
java.lang.Object dft)
Returns the value of the Object property key |
protected java.lang.String |
getString(java.lang.String key,
java.lang.String dft)
Returns the value of the String property key |
boolean |
hasPasswordExpired(long lastChangedTime)
Returns true if the password has passed its expiration date |
protected boolean |
hasProperty(java.lang.String key)
Returns true if the property is defined |
static void |
main(java.lang.String[] argv)
|
void |
setDebugCheckPassword(boolean debugLog)
Sets debug logging for "checkPassword" |
java.lang.String |
toString()
Return String representation of this instance |
boolean |
validateNewPassword(java.lang.String newPass)
Checks new password and returns true if the password passes the policy for newly created password. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String PROP_debugCheckPassword
public static final java.lang.String PROP_passwordEncoding
public static final java.lang.String PROP_minimumPasswordLength
public static final java.lang.String PROP_maximumPasswordAgeSeconds
public static final java.lang.String PROP_specialCharacters
public static final java.lang.String PROP_minimumLowerAlphaChars
public static final java.lang.String PROP_minimumUpperAlphaChars
public static final java.lang.String PROP_minimumAlphaChars
public static final java.lang.String PROP_minimumDigitChars
public static final java.lang.String PROP_minimumSpecialChars
public static final java.lang.String PROP_minimumNonAlphaChars
public static final java.lang.String PROP_minimumCategories
public static final java.lang.String PROP_passwordFormatDescription
public static final int MD5_HASH_LEN
public static final java.lang.String ENC_MD5
public static final java.lang.String ENC_PLAIN
public static final java.lang.String ENC_MD5PLAIN
public static final java.lang.String ENC_PLAINMD5
public static final java.lang.String[] ARG_PASSWORD
public static final java.lang.String[] ARG_ENCODING
public static final java.lang.String[] ARG_MINLEN
public static final java.lang.String[] ARG_MINLOWER
public static final java.lang.String[] ARG_MINUPPER
public static final java.lang.String[] ARG_MINALPHA
public static final java.lang.String[] ARG_MINDIGIT
public static final java.lang.String[] ARG_MINSPEC
public static final java.lang.String[] ARG_TBLPASS
Constructor Detail |
---|
public GeneralPasswordHandler() throws GeneralPasswordHandler.PasswordEncodingException
GeneralPasswordHandler.PasswordEncodingException
public GeneralPasswordHandler(RTProperties rtp) throws GeneralPasswordHandler.PasswordEncodingException
rtp
- The property settings for this instance
GeneralPasswordHandler.PasswordEncodingException
public GeneralPasswordHandler(java.lang.String name, RTProperties rtp) throws GeneralPasswordHandler.PasswordEncodingException
name
- This password handler namertp
- The property settings for this instance
GeneralPasswordHandler.PasswordEncodingException
Method Detail |
---|
public java.lang.String getName()
getName
in interface PasswordHandler
public java.lang.String getEncoding()
public java.lang.String getEncodingString()
public boolean checkPlain()
public boolean checkHash()
protected java.lang.Object getProperty(java.lang.String key, java.lang.Object dft)
protected boolean hasProperty(java.lang.String key)
key
- The property to checkprotected java.lang.String getString(java.lang.String key, java.lang.String dft)
protected long getLong(java.lang.String key, long dft)
protected int getInt(java.lang.String key, int dft)
protected boolean getBoolean(java.lang.String key, boolean dft)
public java.lang.String encodePassword(java.lang.String pass)
encodePassword
in interface PasswordHandler
pass
- The password to encode
public java.lang.String decodePassword(java.lang.String pass)
decodePassword
in interface PasswordHandler
pass
- The password to decode
public void setDebugCheckPassword(boolean debugLog)
debugLog
- True to enable debug logging, false to disablepublic boolean getDebugCheckPassword()
public boolean checkPassword(java.lang.String enteredPass, java.lang.String tablePass)
checkPassword
in interface PasswordHandler
enteredPass
- The User entered passwordtablePass
- The password value from the Account/User table
public boolean validateNewPassword(java.lang.String newPass)
validateNewPassword
in interface PasswordHandler
newPass
- The password to validate as acceptable
public java.lang.String getPasswordFormatDescription(java.util.Locale locale)
getPasswordFormatDescription
in interface PasswordHandler
locale
- The locale
public boolean hasPasswordExpired(long lastChangedTime)
hasPasswordExpired
in interface PasswordHandler
lastChangedTime
- The Epoch timestamp when the password was last changed
public java.lang.String toString()
toString
in class java.lang.Object
public static void main(java.lang.String[] argv)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |