Interface DelayedResultReceiver


public interface DelayedResultReceiver

Provides an interface that allows delayed authentication results to be passed to the Liberator.

The authentication check calls that come from the Liberator are blocking, so in cases where it may take some time to provide a result (for example when relying on a remote database that may introduce a delay) then this mechanism should be used to prevent impairing server performance.

An instance of DelayedResultReceiver is passed to an Authenticator in its initialise method. This instance is then used to pass back delayed authentication results to the Liberator in the case where the initial return value from an authentication check was AuthenticationResult.DELAYED.

See Also:
  • Method Details

    • delayedCheckUserResult

      void delayedCheckUserResult(UserSession userSession, AuthenticationResult result)
      This method should be called when providing a delayed result from a Authenticator.checkUser call.
      Parameters:
      userSession - the UserSession that was passed in the checkUser call.
      result - the delayed AuthenticationResult
    • delayedMapObjectResult

      void delayedMapObjectResult(UserSession userSession, MapObject mappedObject, AuthenticationResult result)
      Use to provide a delayed result for a Authenticator.mapObject call.
      Parameters:
      userSession - the UserSession that was passed in the mapObject call.
      mappedObject - the MapObject that was passed in the mapObject call with the mapped object name set if appropriate.
      result - AuthenticationResult.OK if the object name was mapped or AuthenticationResult.FALSE if the object name was not mapped.
    • delayedCheckWriteResult

      void delayedCheckWriteResult(UserSession userSession, RTTPObject object, String contributionId, AuthenticationResult result)
      Use to provide a delayed result for a Authenticator.checkWrite call.
      Parameters:
      userSession - the UserSession that was passed in the mapObject call.
      object - the RTTPObject the user is attempting to read.
      contributionId - the contribution Id that was passed in the checkWrite call.
      result - the delayed AuthenticationResult