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:
    AuthenticationResult.DELAYED
    • Method Detail

      • 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
      • delayedCheckWriteResult

        void delayedCheckWriteResult​(UserSession userSession,
                                     RTTPObject object,
                                     java.lang.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