Package com.pingidentity.ds.plugin
Class PwpUserState
- java.lang.Object
-
- com.unboundid.directory.sdk.ds.api.Plugin
-
- com.pingidentity.ds.plugin.PwpUserState
-
- All Implemented Interfaces:
com.unboundid.directory.sdk.common.internal.Configurable
,com.unboundid.directory.sdk.common.internal.ExampleUsageProvider
,com.unboundid.directory.sdk.common.internal.Reconfigurable<com.unboundid.directory.sdk.ds.config.PluginConfig>
,com.unboundid.directory.sdk.common.internal.UnboundIDExtension
public class PwpUserState extends com.unboundid.directory.sdk.ds.api.Plugin implements com.unboundid.directory.sdk.common.internal.Reconfigurable<com.unboundid.directory.sdk.ds.config.PluginConfig>
This class provides an implementation of a Server SDK plugin that can be used to interact with password policy state without having recourse to using the PasswordPolicyStateExtendedRequestThis might be useful for developers interacting with our products through third-party LDAP libraries without extended operation support altogether, like LINQ to LDAP for .Net
-
-
Constructor Summary
Constructors Constructor Description PwpUserState()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.unboundid.ldap.sdk.ResultCode
applyConfiguration(com.unboundid.directory.sdk.ds.config.PluginConfig config, com.unboundid.util.args.ArgumentParser parser, List<String> adminActionsRequired, List<String> messages)
This method is called when a configuration change is made to the instance of the plugin.void
defineConfigArguments(com.unboundid.util.args.ArgumentParser parser)
Updates the provided argument parser to include the arguments for this extension.com.unboundid.directory.sdk.ds.types.PostOperationPluginResult
doPostOperation(com.unboundid.directory.sdk.common.types.ActiveOperationContext operationContext, com.unboundid.directory.sdk.common.operation.AddRequest request, com.unboundid.directory.sdk.common.operation.UpdatableAddResult result)
com.unboundid.directory.sdk.ds.types.PreParsePluginResult
doPreParse(com.unboundid.directory.sdk.common.types.ActiveOperationContext operationContext, com.unboundid.directory.sdk.common.operation.UpdatableAddRequest request, com.unboundid.directory.sdk.common.operation.UpdatableAddResult result)
com.unboundid.directory.sdk.ds.types.PreParsePluginResult
doPreParse(com.unboundid.directory.sdk.common.types.ActiveOperationContext operationContext, com.unboundid.directory.sdk.common.operation.UpdatableModifyRequest request, com.unboundid.directory.sdk.common.operation.UpdatableModifyResult result)
Performs processing before the server attempts to parse the LDAP Modify request.com.unboundid.directory.sdk.ds.types.SearchEntryPluginResult
doSearchEntry(com.unboundid.directory.sdk.common.types.ActiveSearchOperationContext operationContext, com.unboundid.directory.sdk.common.operation.SearchRequest request, com.unboundid.directory.sdk.common.operation.UpdatableSearchResult result, com.unboundid.directory.sdk.common.types.UpdatableEntry entry, List<com.unboundid.ldap.sdk.Control> controls)
Performs the necessary processing to add password policy state to entries resulting of an LDAP search request that includes a trigger attribute as per the configuration of this instance of the plugin.String[]
getExtensionDescription()
Retrieves a description for this extension.String
getExtensionName()
Retrieves the name for this extension.void
initializePlugin(com.unboundid.directory.sdk.ds.types.DirectoryServerContext serverContext, com.unboundid.directory.sdk.ds.config.PluginConfig config, com.unboundid.util.args.ArgumentParser parser)
Initializes this plugin.boolean
isConfigurationAcceptable(com.unboundid.directory.sdk.ds.config.PluginConfig config, com.unboundid.util.args.ArgumentParser parser, List<String> unacceptableReasons)
This method allows to validate configuration for the instance of the plugin is going to allow it to perform its task correctly.-
Methods inherited from class com.unboundid.directory.sdk.ds.api.Plugin
doIntermediateResponse, doLDIFExport, doLDIFImport, doPostConnect, doPostDisconnect, doPostOperation, doPostOperation, doPostOperation, doPostOperation, doPostOperation, doPostOperation, doPostOperation, doPostOperation, doPostReplication, doPostReplication, doPostReplication, doPostReplication, doPostResponse, doPostResponse, doPostResponse, doPostResponse, doPostResponse, doPostResponse, doPostResponse, doPostResponse, doPostResponse, doPreOperation, doPreOperation, doPreOperation, doPreOperation, doPreOperation, doPreOperation, doPreOperation, doPreOperation, doPreOperation, doPreParse, doPreParse, doPreParse, doPreParse, doPreParse, doPreParse, doPreParse, doPreParse, doPreParse, doSearchReference, doShutdown, doStartup, doSubordinateModifyDN, finalizePlugin, getExamplesArgumentSets, getStartupDependencies
-
-
-
-
Constructor Detail
-
PwpUserState
public PwpUserState()
-
-
Method Detail
-
getExtensionName
public String getExtensionName()
Retrieves the name for this extension.- Specified by:
getExtensionName
in interfacecom.unboundid.directory.sdk.common.internal.UnboundIDExtension
- Specified by:
getExtensionName
in classcom.unboundid.directory.sdk.ds.api.Plugin
- Returns:
- The name for this extension.
-
getExtensionDescription
public String[] getExtensionDescription()
Retrieves a description for this extension.- Specified by:
getExtensionDescription
in interfacecom.unboundid.directory.sdk.common.internal.UnboundIDExtension
- Specified by:
getExtensionDescription
in classcom.unboundid.directory.sdk.ds.api.Plugin
- Returns:
- A description for this extension.
-
defineConfigArguments
public void defineConfigArguments(com.unboundid.util.args.ArgumentParser parser) throws com.unboundid.util.args.ArgumentException
Updates the provided argument parser to include the arguments for this extension.- Specified by:
defineConfigArguments
in interfacecom.unboundid.directory.sdk.common.internal.Configurable
- Overrides:
defineConfigArguments
in classcom.unboundid.directory.sdk.ds.api.Plugin
- Parameters:
parser
- The argument parser to update.- Throws:
com.unboundid.util.args.ArgumentException
-
isConfigurationAcceptable
public boolean isConfigurationAcceptable(com.unboundid.directory.sdk.ds.config.PluginConfig config, com.unboundid.util.args.ArgumentParser parser, List<String> unacceptableReasons)
This method allows to validate configuration for the instance of the plugin is going to allow it to perform its task correctly.- Specified by:
isConfigurationAcceptable
in interfacecom.unboundid.directory.sdk.common.internal.Reconfigurable<com.unboundid.directory.sdk.ds.config.PluginConfig>
- Overrides:
isConfigurationAcceptable
in classcom.unboundid.directory.sdk.ds.api.Plugin
- Parameters:
config
- the plugin configurationparser
- the argument parser for this extensionunacceptableReasons
- a list of reasons for which the configuration was not acceptable- Returns:
- Boolean the result of evaluating the parameters of the provided parser
-
applyConfiguration
public com.unboundid.ldap.sdk.ResultCode applyConfiguration(com.unboundid.directory.sdk.ds.config.PluginConfig config, com.unboundid.util.args.ArgumentParser parser, List<String> adminActionsRequired, List<String> messages)
This method is called when a configuration change is made to the instance of the plugin. It is called by initializePlugin when the plugin is first instantiated and upon any configuration change thereafter- Specified by:
applyConfiguration
in interfacecom.unboundid.directory.sdk.common.internal.Reconfigurable<com.unboundid.directory.sdk.ds.config.PluginConfig>
- Overrides:
applyConfiguration
in classcom.unboundid.directory.sdk.ds.api.Plugin
- Parameters:
config
- the plugin configurationparser
- the argument parser for this extensionadminActionsRequired
- A list of messages of administrative actions required in order for configuration to be appliedmessages
- A list of messages relating to applying the configuration for this extension- Returns:
- an LDAP Result Code. ResultCode.SUCCESS if all arguments were satisfactory
-
initializePlugin
public void initializePlugin(com.unboundid.directory.sdk.ds.types.DirectoryServerContext serverContext, com.unboundid.directory.sdk.ds.config.PluginConfig config, com.unboundid.util.args.ArgumentParser parser) throws com.unboundid.ldap.sdk.LDAPException
Initializes this plugin. This method is called upon instantiation of the plugin and should ensure proper initialization.- Overrides:
initializePlugin
in classcom.unboundid.directory.sdk.ds.api.Plugin
- Parameters:
serverContext
- A handle to the server context for the server in which this extension is running.config
- The general configuration for this plugin.parser
- The argument parser which has been initialized from the configuration for this plugin.- Throws:
com.unboundid.ldap.sdk.LDAPException
- If a problem occurs while initializing this plugin.
-
doSearchEntry
public com.unboundid.directory.sdk.ds.types.SearchEntryPluginResult doSearchEntry(com.unboundid.directory.sdk.common.types.ActiveSearchOperationContext operationContext, com.unboundid.directory.sdk.common.operation.SearchRequest request, com.unboundid.directory.sdk.common.operation.UpdatableSearchResult result, com.unboundid.directory.sdk.common.types.UpdatableEntry entry, List<com.unboundid.ldap.sdk.Control> controls)
Performs the necessary processing to add password policy state to entries resulting of an LDAP search request that includes a trigger attribute as per the configuration of this instance of the plugin.If the trigger attribute is included, the extended operation is issued internally and each state return is added to the result entry as virtual attributes.
- Overrides:
doSearchEntry
in classcom.unboundid.directory.sdk.ds.api.Plugin
- Parameters:
operationContext
- the operation contextrequest
- the search requestentry
- the search result entrycontrols
- a list of controls provided with the search requestresult
- The result that will be returned to the client if the plugin result indicates that processing on the operation should be interrupted. It may be altered if desired.- Returns:
- Information about the result of the plugin processing.
-
doPreParse
public com.unboundid.directory.sdk.ds.types.PreParsePluginResult doPreParse(com.unboundid.directory.sdk.common.types.ActiveOperationContext operationContext, com.unboundid.directory.sdk.common.operation.UpdatableModifyRequest request, com.unboundid.directory.sdk.common.operation.UpdatableModifyResult result)
Performs processing before the server attempts to parse the LDAP Modify request. If the request includes attributes that match what this instance of the plugin is configured to convert to a PasswordPolicyStateExtendedRequest then the attribute and possibly the attribute value will be parsed and stripped from the modify request.If the instance of the plugin is configured to authenticate the request with TOTP then it fail altogether if no TOTP code is provided or if it is invalid.
If the PasswordPolicyStateExtendedRequest is successful and there are remaining modifications, the remaining modifications will be passed on for normal processing.
- Overrides:
doPreParse
in classcom.unboundid.directory.sdk.ds.api.Plugin
- Parameters:
operationContext
- the operation contextrequest
- the modify requestresult
- The result that will be returned to the client if the plugin result indicates that processing on the operation should be interrupted. It may be altered if desired.- Returns:
- Information about the result of the plugin processing.
-
doPreParse
public com.unboundid.directory.sdk.ds.types.PreParsePluginResult doPreParse(com.unboundid.directory.sdk.common.types.ActiveOperationContext operationContext, com.unboundid.directory.sdk.common.operation.UpdatableAddRequest request, com.unboundid.directory.sdk.common.operation.UpdatableAddResult result)
- Overrides:
doPreParse
in classcom.unboundid.directory.sdk.ds.api.Plugin
-
doPostOperation
public com.unboundid.directory.sdk.ds.types.PostOperationPluginResult doPostOperation(com.unboundid.directory.sdk.common.types.ActiveOperationContext operationContext, com.unboundid.directory.sdk.common.operation.AddRequest request, com.unboundid.directory.sdk.common.operation.UpdatableAddResult result)
- Overrides:
doPostOperation
in classcom.unboundid.directory.sdk.ds.api.Plugin
-
-