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()Default constructor instantiated from authentication policy config manager.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PasswordPolicycreateAuthenticationPolicy(PasswordPolicyCfg configuration)Creates a new authentication policy using the provided configuration.booleanisConfigurationAcceptable(PasswordPolicyCfg configuration, List<org.forgerock.i18n.LocalizableMessage> unacceptableReasons)Indicates whether the provided authentication policy configuration is acceptable.voidsetServerContext(ServerContext serverContext)Sets the server context.
-
-
-
Method Detail
-
setServerContext
public void setServerContext(ServerContext serverContext)
Sets the server context.- Specified by:
setServerContextin interfaceAuthenticationPolicyFactory<PasswordPolicyCfg>- Parameters:
serverContext- The server context.
-
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<org.forgerock.i18n.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.
-
-