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