Class OpenidmAccountStatusNotificationHandler
- java.lang.Object
-
- org.opends.server.api.AccountStatusNotificationHandler<OpenidmAccountStatusNotificationHandlerCfg>
-
- org.forgerock.openidm.accountchange.OpenidmAccountStatusNotificationHandler
-
- All Implemented Interfaces:
ConfigurationChangeListener<OpenidmAccountStatusNotificationHandlerCfg>,ServerShutdownListener
public class OpenidmAccountStatusNotificationHandler extends AccountStatusNotificationHandler<OpenidmAccountStatusNotificationHandlerCfg> implements ConfigurationChangeListener<OpenidmAccountStatusNotificationHandlerCfg>, ServerShutdownListener
An account status notification handler that listens to password reset and password change events in order to propagate them to OpenIDM.The following information is retained for a change
- the entry DN
- the encrypted password
- the kind of change (PASSWORD_CHANGE, PASSWORD_RESET)
- optionally, the values of some attributes (for any attribute listed in the "attribute-type" parameter in the config)
There are two ways the changes can be handled, depending on the 'interval' parameter in the configuration:
- If interval is set to zero, then the change is sent immediately to OpenIDM using a HTTP POST request
- If interval is strictly superior to zero, then the change is stored locally (currently in a JE database). At each interval period of time, the changes which are stored locally are read and sent to OpenIDM using a HTTP POST request>
The communication to OpenIDM can be done in one of three ways:
- Using HTTP : authentication to OpenIDM is done using BASIC Auth, using the openidm-username and opendidm-password parameter values from the configuration
- Using HTTPS without SSL client authentication : authentication to OpenIDM is done using BASIC Auth, using the openidm-username and opendidm-password parameter values from the configuration
- Using HTTPS with SSL client authentication : ssl-cert-nickname parameter value from the configuration is used to retrieve the appropriate client certificate from the provided key manager
-
-
Constructor Summary
Constructors Constructor Description OpenidmAccountStatusNotificationHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ConfigChangeResultapplyConfigurationChange(OpenidmAccountStatusNotificationHandlerCfg configuration)Applies the configuration changes to this change listener.StringgetShutdownListenerName()Returns the listener name.voidhandleStatusNotification(AccountStatusNotification notification)Performs any processing that may be necessary in conjunction with the provided account status notification.voidinitializeStatusNotificationHandler(OpenidmAccountStatusNotificationHandlerCfg configuration)Initializes this account status notification handler based on the information in the provided configuration entry.booleanisConfigurationAcceptable(AccountStatusNotificationHandlerCfg configuration, List<org.forgerock.i18n.LocalizableMessage> unacceptableReasons)Indicates whether the provided configuration is acceptable for this account status notification handler.booleanisConfigurationChangeAcceptable(OpenidmAccountStatusNotificationHandlerCfg configuration, List<org.forgerock.i18n.LocalizableMessage> unacceptableReasons)Indicates whether the proposed change to the configuration is acceptable to this change listener.voidprocessServerShutdown(org.forgerock.i18n.LocalizableMessage reason)Processes a server shutdown.-
Methods inherited from class org.opends.server.api.AccountStatusNotificationHandler
finalizeStatusNotificationHandler
-
-
-
-
Method Detail
-
initializeStatusNotificationHandler
public void initializeStatusNotificationHandler(OpenidmAccountStatusNotificationHandlerCfg configuration) throws ConfigException, InitializationException
Description copied from class:AccountStatusNotificationHandlerInitializes this account status notification handler based on the information in the provided configuration entry.- Specified by:
initializeStatusNotificationHandlerin classAccountStatusNotificationHandler<OpenidmAccountStatusNotificationHandlerCfg>- Parameters:
configuration- The configuration entry that contains the information to use to initialize this account status notification handler.- Throws:
ConfigException- If the provided entry does not contain a valid configuration for this account status notification handler.InitializationException- If a problem occurs during initialization that is not related to the server configuration.
-
isConfigurationAcceptable
public boolean isConfigurationAcceptable(AccountStatusNotificationHandlerCfg configuration, List<org.forgerock.i18n.LocalizableMessage> unacceptableReasons)
Description copied from class:AccountStatusNotificationHandlerIndicates whether the provided configuration is acceptable for this account status notification handler. It should be possible to call this method on an uninitialized account status notification handler instance in order to determine whether the handler would be able to use the provided configuration.
Note that implementations which use a subclass of the provided configuration class will likely need to cast the configuration to the appropriate subclass type.- Overrides:
isConfigurationAcceptablein classAccountStatusNotificationHandler<OpenidmAccountStatusNotificationHandlerCfg>- Parameters:
configuration- The account status notification 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 account status notification handler, orfalseif not.
-
isConfigurationChangeAcceptable
public boolean isConfigurationChangeAcceptable(OpenidmAccountStatusNotificationHandlerCfg configuration, List<org.forgerock.i18n.LocalizableMessage> unacceptableReasons)
Description copied from interface:ConfigurationChangeListenerIndicates whether the proposed change to the configuration is acceptable to this change listener.- Specified by:
isConfigurationChangeAcceptablein interfaceConfigurationChangeListener<OpenidmAccountStatusNotificationHandlerCfg>- Parameters:
configuration- 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(OpenidmAccountStatusNotificationHandlerCfg configuration)
Description copied from interface:ConfigurationChangeListenerApplies the configuration changes to this change listener.- Specified by:
applyConfigurationChangein interfaceConfigurationChangeListener<OpenidmAccountStatusNotificationHandlerCfg>- Parameters:
configuration- The new configuration containing the changes.- Returns:
- Returns information about the result of changing the configuration.
-
handleStatusNotification
public void handleStatusNotification(AccountStatusNotification notification)
Description copied from class:AccountStatusNotificationHandlerPerforms any processing that may be necessary in conjunction with the provided account status notification.- Specified by:
handleStatusNotificationin classAccountStatusNotificationHandler<OpenidmAccountStatusNotificationHandlerCfg>- Parameters:
notification- The account status notification to be processed.
-
getShutdownListenerName
public String getShutdownListenerName()
Returns the listener name.- Specified by:
getShutdownListenerNamein interfaceServerShutdownListener- Returns:
- The name of the listener.
-
processServerShutdown
public void processServerShutdown(org.forgerock.i18n.LocalizableMessage reason)
Processes a server shutdown. If the background thread is running it needs to be interrupted so it can read the stop request variable and exit.- Specified by:
processServerShutdownin interfaceServerShutdownListener- Parameters:
reason- The reason message for the shutdown.
-
-