Class AMAuthCallBackImpl


  • public class AMAuthCallBackImpl
    extends Object
    This class should be instantiated by components in the authentication framework when callbacks to an external application's logic are required. When an account is being locked or a password is being changed, then some plug-in classes can be called. Those plug-in classes are defined within the core authentication service of each organization or realm. The AMAuthCallBackImpl class provides 2 convenient methods that correspond to the use cases mentioned above : account lockout and password change . These methods should be called when one of the events has happened. Each method calls the private utility method, processedEvent, and takes care of associating the appropriate event type. Instances of this class should be called via the getInstance method. It returns a singleton associated with the corresponding realm or organization. The class holds a map of instantiated objects. Each object holds a map of instantiated plug-in classes for a particular realm or organization. These plug-in classes are accessed via the AMAuthCallBack plug-in class, which serves as a base for the custom business logic. Sample call :
          callbackImpl = AMAuthCallBackImpl.getInstance( realm );
          callbackImpl.processedAccounttLockout( now, userDN );
     
    See Also:
    AMAuthCallBackException, AMAuthCallBack
    • Method Detail

      • getInstance

        public static final AMAuthCallBackImpl getInstance​(String aRealm)
                                                    throws AMAuthCallBackException
        Public accessor for the singleton. Returns the instance (singleton) of the callback implementation, for the appropriate realm.
        Parameters:
        aRealm - the name of the realm for which to get the callbacks
        Returns:
        AMAuthCallBackImpl the singleton instance.
        Throws:
        AMAuthCallBackException - if there was an initialization error during the construction of the singleton.
      • processedPasswordChange

        public void processedPasswordChange​(Long eventTime,
                                            String userDN)
                                     throws AMAuthCallBackException
        Calls the plug-in class(es) when a password change has been processed by an authentication module.
        Parameters:
        eventTime - the time when the event occurred
        userDN - the user's DN for which the event occurred
        Throws:
        AMAuthCallBackException - the exception raised by the plug-in
      • processedAccounttLockout

        public void processedAccounttLockout​(Long eventTime,
                                             String userDN)
                                      throws AMAuthCallBackException
        Calls the plug-in class(es) when an account lockout has been processed by an authentication module.
        Parameters:
        eventTime - the time when the event occurred
        userDN - the user's DN for which the event occurred
        Throws:
        AMAuthCallBackException - the exception raised by the plug-in
      • processedEvent

        public void processedEvent​(int eventType,
                                   Map eventParams)
                            throws AMAuthCallBackException
        Calls the plug-in class(es) when an event has been processed by an authentication module. This method is a general method to be used by the more event-specific methods. There are currently 2 main event types : password change and account lockout.
        Parameters:
        eventType - the type of event being processed
        eventParams - the map of parameters for the current event
        Throws:
        AMAuthCallBackException - the exception raised by the plug-in