|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
Defines methods for OpenCms password validation.
| Field Summary | |
static String |
CONVERT_DIGEST_ENCODING
Flag for conversion of the password encoding. |
static String |
DIGEST_TYPE_MD5
String to identify the key value for md5 password hashes. |
static String |
DIGEST_TYPE_PLAIN
String to identify the key value for unhashed passwords. |
static String |
DIGEST_TYPE_SHA
String to identify the key value for sha password hashes. |
static String |
DIGEST_TYPE_SSHA
String to identify the key value for sha password hashes with 4 byte salt. |
| Fields inherited from interface org.opencms.configuration.I_CmsConfigurationParameterHandler |
ADD_PARAMETER_METHOD, INIT_CONFIGURATION_METHOD |
| Method Summary | |
String |
digest(String password)
Creates an OpenCms password digest according to the default setting for method/encodings. |
String |
digest(String password,
String digestType,
String inputEncoding)
Creates an OpenCms password digest. |
String |
getDigestType()
Returns the default digest type. |
String |
getInputEncoding()
Returns the default password encoding. |
void |
setDigestType(String digestType)
Sets the default digest type. |
void |
setInputEncoding(String inputEncoding)
Sets the default input encoding. |
void |
validatePassword(String password)
This method checks if a new password follows the rules for new passwords, which are defined by a Class configured in the opencms.properties file. |
| Methods inherited from interface org.opencms.configuration.I_CmsConfigurationParameterHandler |
addConfigurationParameter, getConfiguration, initConfiguration |
| Field Detail |
public static final String CONVERT_DIGEST_ENCODING
public static final String DIGEST_TYPE_MD5
public static final String DIGEST_TYPE_PLAIN
public static final String DIGEST_TYPE_SHA
public static final String DIGEST_TYPE_SSHA
| Method Detail |
public String digest(String password)
throws CmsPasswordEncryptionException
password - the password to encrypt
CmsPasswordEncryptionException - if something goes wrong
public String digest(String password,
String digestType,
String inputEncoding)
throws CmsPasswordEncryptionException
password - the password to encryptdigestType - the algorithm used for encryption (i.e. MD5, SHA ...)inputEncoding - the encoding used when converting the password to bytes (i.e. UTF-8)
CmsPasswordEncryptionException - if something goes wrongpublic String getDigestType()
public String getInputEncoding()
public void setDigestType(String digestType)
digestType - the digest type usedpublic void setInputEncoding(String inputEncoding)
inputEncoding - the encoding used for translation the password string to bytes
public void validatePassword(String password)
throws CmsSecurityException
If this method throws no exception the password is valid.
password - the password to check
CmsSecurityException - if validation of the password failed
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||