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
FieldsModifier and TypeFieldDescriptionstatic final StringThe name of the attachment which will be used to store the fully resolved target entry.static final StringThe clear text password, which may not be present if the provided password was pre-encoded.static final StringA list containing the encoded passwords: plugins can perform changes atomically via CAS.static final StringThe name of the attachment which will be used to store the password attribute. -
Constructor Summary
ConstructorsConstructorDescriptionCreate an instance of this password modify extended operation. -
Method Summary
Modifier and TypeMethodDescriptionApplies the configuration changes to this change listener.voidPerforms 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.voidinitializeExtendedOperationHandler(PasswordModifyExtendedOperationHandlerCfg config, ServerContext serverContext) Initializes this extended operation handler based on the information in the provided configuration entry.booleanisConfigurationAcceptable(PasswordModifyExtendedOperationHandlerCfg configuration, List<LocalizableMessage> unacceptableReasons) Indicates whether the provided configuration is acceptable for this extended operation handler.booleanisConfigurationChangeAcceptable(PasswordModifyExtendedOperationHandlerCfg config, List<LocalizableMessage> unacceptableReasons) Indicates whether the proposed change to the configuration is acceptable to this change listener.processExtendedOperation(ExtendedOperation operation) Processes the provided extended operation.Methods inherited from class org.opends.server.api.ExtendedOperationHandler
getServerContext, getSupportedControls, 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, ServerContext serverContext) throws ConfigException, InitializationException Description copied from class:ExtendedOperationHandlerInitializes 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:
initializeExtendedOperationHandlerin classExtendedOperationHandler<PasswordModifyExtendedOperationHandlerCfg>- Parameters:
config- The extended operation handler configuration that contains the information to use to initialize this extended operation handler.serverContext- the server context- 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:ExtendedOperationHandlerPerforms any finalization that may be necessary for this extended operation handler. By default, no finalization is performed. -
processExtendedOperation
Description copied from class:ExtendedOperationHandlerProcesses the provided extended operation.- Specified by:
processExtendedOperationin classExtendedOperationHandler<PasswordModifyExtendedOperationHandlerCfg>- Parameters:
operation- The extended operation to be processed.- Returns:
- The result of processing the extended operation.
- 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:ExtendedOperationHandlerIndicates 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:
isConfigurationAcceptablein 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:
trueif the provided configuration is acceptable for this extended operation handler, orfalseif not.
-
isConfigurationChangeAcceptable
public boolean isConfigurationChangeAcceptable(PasswordModifyExtendedOperationHandlerCfg config, List<LocalizableMessage> unacceptableReasons) Description copied from interface:ConfigurationChangeListenerIndicates whether the proposed change to the configuration is acceptable to this change listener.- Specified by:
isConfigurationChangeAcceptablein 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
trueif the proposed change is acceptable, orfalseif it is not.
-
applyConfigurationChange
public ConfigChangeResult applyConfigurationChange(PasswordModifyExtendedOperationHandlerCfg config) Description copied from interface:ConfigurationChangeListenerApplies the configuration changes to this change listener.- Specified by:
applyConfigurationChangein 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:ExtendedOperationHandlerRetrieves the object OID associated with this extended operation.- Specified by:
getExtendedOperationOIDin classExtendedOperationHandler<PasswordModifyExtendedOperationHandlerCfg>- Returns:
- the oid associated with this extended operation, if any, or
nullif there is none.
-
getExtendedOperationName
Description copied from class:ExtendedOperationHandlerRetrieves the name associated with this extended operation.- Specified by:
getExtendedOperationNamein classExtendedOperationHandler<PasswordModifyExtendedOperationHandlerCfg>- Returns:
- The name associated with this extended operation, if any, or
nullif there is none.
-