Class DefaultNotCodePasswordPolicy

java.lang.Object
com.axelor.auth.password.policy.DefaultNotCodePasswordPolicy
All Implemented Interfaces:
PasswordPolicy, NotCodePasswordPolicy

@Singleton public class DefaultNotCodePasswordPolicy extends Object implements NotCodePasswordPolicy
Default implementation of NotCodePasswordPolicy.
  • Constructor Details

    • DefaultNotCodePasswordPolicy

      public DefaultNotCodePasswordPolicy()
  • Method Details

    • validate

      public InvalidPolicy validate(@Nullable User user, String password)
      Description copied from interface: PasswordPolicy
      Checks whether the given password satisfies this policy rule.
      Specified by:
      validate in interface PasswordPolicy
      Parameters:
      user - the user for context-aware checks, or null for new users
      password - the plain-text password to check
      Returns:
      an InvalidPolicy if the password violates this rule
    • getDescription

      public PolicyDescription getDescription()
      Description copied from interface: PasswordPolicy
      Returns 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 null when the policy has no meaningful description (e.g. a pattern policy with no pattern configured).

      Specified by:
      getDescription in interface PasswordPolicy
      Returns:
      a PolicyDescription, or null if not applicable