Package com.axelor.auth.password.policy
Class DefaultLengthPasswordPolicy
java.lang.Object
com.axelor.auth.password.policy.DefaultLengthPasswordPolicy
- All Implemented Interfaces:
PasswordPolicy,LengthPasswordPolicy
Default implementation of
LengthPasswordPolicy.-
Field Summary
Fields inherited from interface com.axelor.auth.password.policy.LengthPasswordPolicy
ID -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns a description of this policy's requirement, suitable for display on the login or change-password page as guidance before the user submits.protected intgetMin()Checks whether the given password satisfies this policy rule.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.axelor.auth.password.policy.LengthPasswordPolicy
getPolicyId, isMandatoryMethods inherited from interface com.axelor.auth.password.PasswordPolicy
isEnabledByDefault
-
Constructor Details
-
DefaultLengthPasswordPolicy
public DefaultLengthPasswordPolicy()
-
-
Method Details
-
validate
Description copied from interface:PasswordPolicyChecks whether the given password satisfies this policy rule.- Specified by:
validatein interfacePasswordPolicy- Parameters:
user- the user for context-aware checks, ornullfor new userspassword- the plain-text password to check- Returns:
- an
InvalidPolicyif the password violates this rule
-
getDescription
Description copied from interface:PasswordPolicyReturns a description of this policy's requirement, suitable for display on the login or change-password page as guidance before the user submits. This is distinct from the error message returned on violation.Implementations may return
nullwhen the policy has no meaningful description (e.g. a pattern policy with no pattern configured).- Specified by:
getDescriptionin interfacePasswordPolicy- Returns:
- a
PolicyDescription, ornullif not applicable
-
getMin
protected int getMin()
-