Package org.opends.server.core
Class PasswordPolicyFactory
- java.lang.Object
-
- org.opends.server.core.PasswordPolicyFactory
-
- All Implemented Interfaces:
AuthenticationPolicyFactory<PasswordPolicyCfg>
public final class PasswordPolicyFactory extends Object implements AuthenticationPolicyFactory<PasswordPolicyCfg>
This class is the interface between the password policy configurable component and a password policy state object. When a password policy entry is added to the configuration, an instance of this class is created and registered to manage subsequent modification to that configuration entry, including validating any proposed modification and applying an accepted modification.
-
-
Constructor Summary
Constructors Constructor Description PasswordPolicyFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PasswordPolicy
createAuthenticationPolicy(PasswordPolicyCfg configuration)
Creates a new authentication policy using the provided configuration.boolean
isConfigurationAcceptable(PasswordPolicyCfg configuration, List<LocalizableMessage> unacceptableReasons)
Indicates whether the provided authentication policy configuration is acceptable.
-
-
-
Method Detail
-
createAuthenticationPolicy
public PasswordPolicy createAuthenticationPolicy(PasswordPolicyCfg configuration) throws ConfigException, InitializationException
Description copied from interface:AuthenticationPolicyFactory
Creates a new authentication policy using the provided configuration.- Specified by:
createAuthenticationPolicy
in interfaceAuthenticationPolicyFactory<PasswordPolicyCfg>
- Parameters:
configuration
- The configuration.- Returns:
- The new authentication policy configured using the provided configuration.
- Throws:
ConfigException
- If an unrecoverable problem arises during initialization of the authentication policy as a result of the server configuration.InitializationException
- If a problem occurs during initialization of the authentication policy.
-
isConfigurationAcceptable
public boolean isConfigurationAcceptable(PasswordPolicyCfg configuration, List<LocalizableMessage> unacceptableReasons)
Description copied from interface:AuthenticationPolicyFactory
Indicates whether the provided authentication policy configuration is acceptable.- Specified by:
isConfigurationAcceptable
in interfaceAuthenticationPolicyFactory<PasswordPolicyCfg>
- Parameters:
configuration
- The authentication policy configuration.unacceptableReasons
- A list that can be used to hold messages about why the provided configuration is not acceptable.- Returns:
- Returns
true
if the provided authentication policy configuration is acceptable, orfalse
if it is not.
-
-