Interface PasswordRule
-
- All Known Implementing Classes:
AbstractPasswordRule
,AlphaNumericPasswordRule
,AlphaPasswordRule
,CharacterLengthPasswordRule
,MustHavePasswordRule
,NumericalPasswordRule
,ReusePasswordRule
,WhitespacePasswordRule
public interface PasswordRule
A Password Rule- Author:
- Joakim Erdfelt
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
initialize()
to use in case of configuration change.boolean
isEnabled()
Tests if rule is enabled (or not)boolean
requiresSecurityPolicy()
true if the security policy has been set on the rulevoid
setUserSecurityPolicy(UserSecurityPolicy policy)
Sets the User Security Policy to use.void
testPassword(PasswordRuleViolations violations, User user)
Tests theUser.getPassword()
for a valid password, based on rule.
-
-
-
Method Detail
-
isEnabled
boolean isEnabled()
Tests if rule is enabled (or not)
-
setUserSecurityPolicy
void setUserSecurityPolicy(UserSecurityPolicy policy)
Sets the User Security Policy to use. The policy is set once per instance of a PasswordRule object.- Parameters:
policy
- the policy to use.
-
requiresSecurityPolicy
boolean requiresSecurityPolicy()
true if the security policy has been set on the rule- Returns:
- boolean
-
testPassword
void testPassword(PasswordRuleViolations violations, User user)
Tests theUser.getPassword()
for a valid password, based on rule.- Parameters:
violations
- the place to add any password rule violations that this rule has discovered.user
- the User to test.
-
initialize
void initialize()
to use in case of configuration change.
-
-