Package com.axelor.auth.password
Interface AuthPasswordManager
- All Known Implementing Classes:
DefaultAuthPasswordManager
public interface AuthPasswordManager
Manages password validation by aggregating all registered
PasswordPolicy rules.
Policies are contributed via Guice Multibindings, allowing downstream modules to add custom rules without replacing the manager.
-
Method Summary
Modifier and TypeMethodDescriptionReturns the descriptions of all currently enabled policies, in evaluation order.Validates the given password against all registered policies.
-
Method Details
-
validate
Validates the given password against all registered policies.Policies are checked in sequence and stop at the first violation.
- Parameters:
password- the plain-text password to validateuser- the user for context-aware checks, ornullfor new users- Returns:
- an
InvalidPolicydescribing the first violated policy, ornullif all policies pass
-
getDescriptions
List<PolicyDescription> getDescriptions()Returns the descriptions of all currently enabled policies, in evaluation order. Policies that returnnullfromPasswordPolicy.getDescription()are excluded.The resulting list is intended to be displayed as guidance on the login or change-password page, before the user submits a new password.
- Returns:
- an ordered list of policy descriptions
-