Package org.opencms.security
Class CmsAdvancedPasswordHandler
java.lang.Object
org.opencms.security.CmsDefaultPasswordHandler
org.opencms.security.CmsAdvancedPasswordHandler
- All Implemented Interfaces:
I_CmsConfigurationParameterHandler,I_CmsPasswordGenerator,I_CmsPasswordHandler,I_CmsPasswordSecurityEvaluator
Validates the user passwords in with advanced password requirements.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.opencms.security.I_CmsPasswordSecurityEvaluator
I_CmsPasswordSecurityEvaluator.SecurityLevel -
Field Summary
Fields inherited from class org.opencms.security.CmsDefaultPasswordHandler
PARAM_SCRYPT_FALLBACK, PARAM_SCRYPT_SETTINGS, PASSWORD_MIN_LENGTH, PASSWORD_SECURE_LENGTHFields inherited from interface org.opencms.configuration.I_CmsConfigurationParameterHandler
ADD_PARAMETER_METHOD, INIT_CONFIGURATION_METHODFields inherited from interface org.opencms.security.I_CmsPasswordHandler
CONVERT_DIGEST_ENCODING, DIGEST_TYPE_MD5, DIGEST_TYPE_PLAIN, DIGEST_TYPE_SCRYPT, DIGEST_TYPE_SHA, DIGEST_TYPE_SSHA -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionevaluatePasswordSecurity(String password) Evaluates the given password security.getPasswordSecurityHint(Locale locale) Returns a hint describing how to set a secure password.voidvalidatePassword(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 class org.opencms.security.CmsDefaultPasswordHandler
addConfigurationParameter, checkPassword, digest, digest, getConfiguration, getDigestType, getInputEncoding, getRandomPassword, initConfiguration, setDigestType, setInputEncoding
-
Constructor Details
-
CmsAdvancedPasswordHandler
public CmsAdvancedPasswordHandler()
-
-
Method Details
-
evaluatePasswordSecurity
Description copied from interface:I_CmsPasswordSecurityEvaluatorEvaluates the given password security.- Specified by:
evaluatePasswordSecurityin interfaceI_CmsPasswordSecurityEvaluator- Overrides:
evaluatePasswordSecurityin classCmsDefaultPasswordHandler- Parameters:
password- the password- Returns:
- the security level as a number between 0 and 1, 0 meaning a low security and 1 a strong security
- See Also:
-
getPasswordSecurityHint
Description copied from interface:I_CmsPasswordSecurityEvaluatorReturns a hint describing how to set a secure password.- Specified by:
getPasswordSecurityHintin interfaceI_CmsPasswordSecurityEvaluator- Overrides:
getPasswordSecurityHintin classCmsDefaultPasswordHandler- Parameters:
locale- the locale- Returns:
- the password security hint
- See Also:
-
validatePassword
Description copied from interface:I_CmsPasswordHandlerThis method checks if a new password follows the rules for new passwords, which are defined by a Class configured in the opencms.properties file.If this method throws no exception the password is valid.
- Specified by:
validatePasswordin interfaceI_CmsPasswordHandler- Overrides:
validatePasswordin classCmsDefaultPasswordHandler- Parameters:
password- the password to check- Throws:
CmsSecurityException- if validation of the password failed- See Also:
-