Class OpenidmAccountStatusNotificationHandler
- java.lang.Object
-
- org.opends.server.api.AccountStatusNotificationHandler<OpenidmAccountStatusNotificationHandlerCfg>
-
- org.forgerock.openidm.accountchange.OpenidmAccountStatusNotificationHandler
-
- All Implemented Interfaces:
org.forgerock.opendj.config.server.ConfigurationChangeListener<OpenidmAccountStatusNotificationHandlerCfg>,ServerShutdownListener
public class OpenidmAccountStatusNotificationHandler extends AccountStatusNotificationHandler<OpenidmAccountStatusNotificationHandlerCfg> implements org.forgerock.opendj.config.server.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 org.forgerock.opendj.config.server.ConfigChangeResultapplyConfigurationChange(OpenidmAccountStatusNotificationHandlerCfg configuration)StringgetShutdownListenerName()Returns the listener name.voidhandleStatusNotification(AccountStatusNotification notification)voidinitializeStatusNotificationHandler(OpenidmAccountStatusNotificationHandlerCfg configuration)booleanisConfigurationAcceptable(org.forgerock.opendj.server.config.server.AccountStatusNotificationHandlerCfg configuration, List<org.forgerock.i18n.LocalizableMessage> unacceptableReasons)booleanisConfigurationChangeAcceptable(OpenidmAccountStatusNotificationHandlerCfg configuration, List<org.forgerock.i18n.LocalizableMessage> unacceptableReasons)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 org.forgerock.opendj.config.server.ConfigException, InitializationException
- Specified by:
initializeStatusNotificationHandlerin classAccountStatusNotificationHandler<OpenidmAccountStatusNotificationHandlerCfg>- Throws:
org.forgerock.opendj.config.server.ConfigExceptionInitializationException
-
isConfigurationAcceptable
public boolean isConfigurationAcceptable(org.forgerock.opendj.server.config.server.AccountStatusNotificationHandlerCfg configuration, List<org.forgerock.i18n.LocalizableMessage> unacceptableReasons)
-
isConfigurationChangeAcceptable
public boolean isConfigurationChangeAcceptable(OpenidmAccountStatusNotificationHandlerCfg configuration, List<org.forgerock.i18n.LocalizableMessage> unacceptableReasons)
- Specified by:
isConfigurationChangeAcceptablein interfaceorg.forgerock.opendj.config.server.ConfigurationChangeListener<OpenidmAccountStatusNotificationHandlerCfg>
-
applyConfigurationChange
public org.forgerock.opendj.config.server.ConfigChangeResult applyConfigurationChange(OpenidmAccountStatusNotificationHandlerCfg configuration)
- Specified by:
applyConfigurationChangein interfaceorg.forgerock.opendj.config.server.ConfigurationChangeListener<OpenidmAccountStatusNotificationHandlerCfg>
-
handleStatusNotification
public void handleStatusNotification(AccountStatusNotification notification)
- Specified by:
handleStatusNotificationin classAccountStatusNotificationHandler<OpenidmAccountStatusNotificationHandlerCfg>
-
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.
-
-