Class AuthCallbackProxy

Object
com.tailf.dp.annotations.AuthCallbackProxy
All Implemented Interfaces:
DpAuthCallback

public class AuthCallbackProxy extends Object implements DpAuthCallback
Callback proxy for Authorization Callbacks. Implements the DpAuthCallback interface and delegates calls to the registered callback POJO with annotated methods
  • Constructor Details

    • AuthCallbackProxy

      public AuthCallbackProxy(Object backupObject)
      Constructor for Callback proxys. Used internally.
      Parameters:
      backupObject - registered callback POJO
  • Method Details

    • getBackupObject

      public Object getBackupObject()
      Retrieve the callback POJO
      Returns:
      Object registered callback object
    • addActionMethod

      public void addActionMethod(String name, Method method)
      Add callback action method to proxy
      Parameters:
      name - canonical action name
      method - registered callback method
    • addActionCapability

      public void addActionCapability(AuthCBType authCBType)
      Add action capability from annotated callType used to register capabilities on the server
      Parameters:
      authCBType - action type
    • auth

      public boolean auth(DpAuthContext atx) throws DpCallbackException
      Description copied from interface: DpAuthCallback
      The auth() callback is invoked with an instance to an authentication context that provides information about the result of the authentication so far. The callback must return true or false depending on the user being accepted or rejected.
      Specified by:
      auth in interface DpAuthCallback
      Parameters:
      atx - authentication context
      Returns:
      boolean
      Throws:
      DpCallbackException
    • getAuthCallbackProxys

      public static AuthCallbackProxy[] getAuthCallbackProxys(Object obj) throws DpCallbackException
      Get array of proxy objects from registered POJO callback. Used internally at callback registration
      Parameters:
      obj - registered Callback POJO
      Returns:
      array of DBCallbackProxy
      Throws:
      DpCallbackException