Class MustHavePasswordRule
- java.lang.Object
-
- org.apache.archiva.redback.policy.rules.AbstractPasswordRule
-
- org.apache.archiva.redback.policy.rules.MustHavePasswordRule
-
- All Implemented Interfaces:
PasswordRule
@Service("passwordRule#must-have") public class MustHavePasswordRule extends AbstractPasswordRuleBasic Password Rule, Checks for non-empty Passwords in non guest users.- Author:
- Joakim Erdfelt
-
-
Field Summary
Fields Modifier and Type Field Description static StringMISSING_PASSWORD_VIOLATION-
Fields inherited from class org.apache.archiva.redback.policy.rules.AbstractPasswordRule
config, enabled
-
-
Constructor Summary
Constructors Constructor Description MustHavePasswordRule()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidinitialize()to use in case of configuration change.voidsetUserSecurityPolicy(UserSecurityPolicy policy)Sets the User Security Policy to use.voidtestPassword(PasswordRuleViolations violations, User user)Tests theUser.getPassword()for a valid password, based on rule.-
Methods inherited from class org.apache.archiva.redback.policy.rules.AbstractPasswordRule
isEnabled, requiresSecurityPolicy
-
-
-
-
Field Detail
-
MISSING_PASSWORD_VIOLATION
public static final String MISSING_PASSWORD_VIOLATION
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
MustHavePasswordRule
public MustHavePasswordRule()
-
-
Method Detail
-
setUserSecurityPolicy
public void setUserSecurityPolicy(UserSecurityPolicy policy)
Description copied from interface:PasswordRuleSets the User Security Policy to use. The policy is set once per instance of a PasswordRule object.- Parameters:
policy- the policy to use.
-
testPassword
public void testPassword(PasswordRuleViolations violations, User user)
Description copied from interface:PasswordRuleTests 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
@PostConstruct public void initialize()
Description copied from interface:PasswordRuleto use in case of configuration change.
-
-