Package com.axelor.auth.password.policy
Class DefaultSpecialCharsPasswordPolicy
java.lang.Object
com.axelor.auth.password.policy.DefaultSpecialCharsPasswordPolicy
- All Implemented Interfaces:
PasswordPolicy,SpecialCharsPasswordPolicy
@Singleton
public class DefaultSpecialCharsPasswordPolicy
extends Object
implements SpecialCharsPasswordPolicy
Default implementation of
SpecialCharsPasswordPolicy.-
Field Summary
Fields inherited from interface com.axelor.auth.password.policy.SpecialCharsPasswordPolicy
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.PasswordPolicy
isMandatoryMethods inherited from interface com.axelor.auth.password.policy.SpecialCharsPasswordPolicy
getPolicyId, isEnabledByDefault
-
Constructor Details
-
DefaultSpecialCharsPasswordPolicy
public DefaultSpecialCharsPasswordPolicy()
-
-
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()
-