Package org.opends.server.extensions
Class PasswordModifyExtendedOperation
java.lang.Object
org.opends.server.api.ExtendedOperationHandler<PasswordModifyExtendedOperationHandlerCfg>
org.opends.server.extensions.PasswordModifyExtendedOperation
- All Implemented Interfaces:
ConfigurationChangeListener<PasswordModifyExtendedOperationHandlerCfg>
public final class PasswordModifyExtendedOperation
extends ExtendedOperationHandler<PasswordModifyExtendedOperationHandlerCfg>
implements ConfigurationChangeListener<PasswordModifyExtendedOperationHandlerCfg>
This class implements the password modify extended operation defined in RFC 3062. It includes support for requiring
the user's current password as well as for generating a new password if none was provided.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The name of the attachment which will be used to store the fully resolved target entry.static final String
The clear text password, which may not be present if the provided password was pre-encoded.static final String
A list containing the encoded passwords: plugins can perform changes atomically via CAS.static final String
The name of the attachment which will be used to store the password attribute. -
Constructor Summary
ConstructorDescriptionCreate an instance of this password modify extended operation. -
Method Summary
Modifier and TypeMethodDescriptionApplies the configuration changes to this change listener.void
Performs any finalization that may be necessary for this extended operation handler.Retrieves the name associated with this extended operation.Retrieves the object OID associated with this extended operation.void
Initializes this extended operation handler based on the information in the provided configuration entry.boolean
isConfigurationAcceptable
(PasswordModifyExtendedOperationHandlerCfg configuration, List<LocalizableMessage> unacceptableReasons) Indicates whether the provided configuration is acceptable for this extended operation handler.boolean
isConfigurationChangeAcceptable
(PasswordModifyExtendedOperationHandlerCfg config, List<LocalizableMessage> unacceptableReasons) Indicates whether the proposed change to the configuration is acceptable to this change listener.void
processExtendedOperation
(ExtendedOperation operation) Processes the provided extended operation.Methods inherited from class org.opends.server.api.ExtendedOperationHandler
getServerContext, getSupportedControls, getSupportedFeatures, supportsControl
-
Field Details
-
AUTHZ_DN_ATTACHMENT
The name of the attachment which will be used to store the fully resolved target entry. -
PWD_ATTRIBUTE_ATTACHMENT
The name of the attachment which will be used to store the password attribute. -
CLEAR_PWD_ATTACHMENT
The clear text password, which may not be present if the provided password was pre-encoded. -
ENCODED_PWD_ATTACHMENT
A list containing the encoded passwords: plugins can perform changes atomically via CAS.
-
-
Constructor Details
-
PasswordModifyExtendedOperation
public PasswordModifyExtendedOperation()Create an instance of this password modify extended operation. All initialization should be performed in theinitializeExtendedOperationHandler()
method.
-
-
Method Details
-
initializeExtendedOperationHandler
public void initializeExtendedOperationHandler(PasswordModifyExtendedOperationHandlerCfg config) throws ConfigException, InitializationException Description copied from class:ExtendedOperationHandler
Initializes this extended operation handler based on the information in the provided configuration entry. It should also register itself with the Directory Server for the particular kinds of extended operations that it will process.- Overrides:
initializeExtendedOperationHandler
in classExtendedOperationHandler<PasswordModifyExtendedOperationHandlerCfg>
- Parameters:
config
- The extended operation handler configuration that contains the information to use to initialize this extended operation handler.- Throws:
ConfigException
- If an unrecoverable problem arises in the process of performing the initialization.InitializationException
- If a problem occurs during initialization that is not related to the server configuration.
-
finalizeExtendedOperationHandler
public void finalizeExtendedOperationHandler()Description copied from class:ExtendedOperationHandler
Performs any finalization that may be necessary for this extended operation handler. By default, no finalization is performed. -
processExtendedOperation
Description copied from class:ExtendedOperationHandler
Processes the provided extended operation.- Specified by:
processExtendedOperation
in classExtendedOperationHandler<PasswordModifyExtendedOperationHandlerCfg>
- Parameters:
operation
- The extended operation to be processed.- Throws:
LdapException
- If the extended operation failed. The exception's result will be returned to the client.
-
isConfigurationAcceptable
public boolean isConfigurationAcceptable(PasswordModifyExtendedOperationHandlerCfg configuration, List<LocalizableMessage> unacceptableReasons) Description copied from class:ExtendedOperationHandler
Indicates whether the provided configuration is acceptable for this extended operation handler. It should be possible to call this method on an uninitialized extended operation handler instance in order to determine whether the extended operation handler would be able to use the provided configuration.- Overrides:
isConfigurationAcceptable
in classExtendedOperationHandler<PasswordModifyExtendedOperationHandlerCfg>
- Parameters:
configuration
- The extended operation handler configuration for which to make the determination.unacceptableReasons
- A list that may be used to hold the reasons that the provided configuration is not acceptable.- Returns:
true
if the provided configuration is acceptable for this extended operation handler, orfalse
if not.
-
isConfigurationChangeAcceptable
public boolean isConfigurationChangeAcceptable(PasswordModifyExtendedOperationHandlerCfg config, List<LocalizableMessage> unacceptableReasons) Description copied from interface:ConfigurationChangeListener
Indicates whether the proposed change to the configuration is acceptable to this change listener.- Specified by:
isConfigurationChangeAcceptable
in interfaceConfigurationChangeListener<PasswordModifyExtendedOperationHandlerCfg>
- Parameters:
config
- The new configuration containing the changes.unacceptableReasons
- A list that can be used to hold messages about why the provided configuration is not acceptable.- Returns:
- Returns
true
if the proposed change is acceptable, orfalse
if it is not.
-
applyConfigurationChange
public ConfigChangeResult applyConfigurationChange(PasswordModifyExtendedOperationHandlerCfg config) Description copied from interface:ConfigurationChangeListener
Applies the configuration changes to this change listener.- Specified by:
applyConfigurationChange
in interfaceConfigurationChangeListener<PasswordModifyExtendedOperationHandlerCfg>
- Parameters:
config
- The new configuration containing the changes.- Returns:
- Returns information about the result of changing the configuration.
-
getExtendedOperationOID
Description copied from class:ExtendedOperationHandler
Retrieves the object OID associated with this extended operation.- Specified by:
getExtendedOperationOID
in classExtendedOperationHandler<PasswordModifyExtendedOperationHandlerCfg>
- Returns:
- the oid associated with this extended operation, if any, or
null
if there is none.
-
getExtendedOperationName
Description copied from class:ExtendedOperationHandler
Retrieves the name associated with this extended operation.- Specified by:
getExtendedOperationName
in classExtendedOperationHandler<PasswordModifyExtendedOperationHandlerCfg>
- Returns:
- The name associated with this extended operation, if any, or
null
if there is none.
-