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 -
Method Summary
Modifier and TypeMethodDescriptioncreateAuthenticationPolicy(PasswordPolicyCfg configuration) Creates a new authentication policy using the provided configuration.booleanisConfigurationAcceptable(PasswordPolicyCfg configuration, List<LocalizableMessage> unacceptableReasons) Indicates whether the provided authentication policy configuration is acceptable.voidsetServerContext(ServerContext serverContext) Sets the server context.
-
Constructor Details
-
PasswordPolicyFactory
public PasswordPolicyFactory()
-
-
Method Details
-
createAuthenticationPolicy
public PasswordPolicy createAuthenticationPolicy(PasswordPolicyCfg configuration) throws ConfigException, InitializationException Description copied from interface:AuthenticationPolicyFactoryCreates a new authentication policy using the provided configuration.- Specified by:
createAuthenticationPolicyin 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:AuthenticationPolicyFactoryIndicates whether the provided authentication policy configuration is acceptable.- Specified by:
isConfigurationAcceptablein 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
trueif the provided authentication policy configuration is acceptable, orfalseif it is not.
-
setServerContext
Description copied from interface:AuthenticationPolicyFactorySets the server context.- Specified by:
setServerContextin interfaceAuthenticationPolicyFactory<PasswordPolicyCfg>- Parameters:
serverContext- the server context
-