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
.
AuthenticationResult.DELAYED
Modifier and Type | Method and Description |
---|---|
void |
delayedCheckUserResult(UserSession userSession,
AuthenticationResult result)
This method should be called when providing a delayed result from a
Authenticator.checkUser call. |
void |
delayedCheckWriteResult(UserSession userSession,
RTTPObject object,
java.lang.String contributionId,
AuthenticationResult result)
Use to provide a delayed result for a
Authenticator.checkWrite call. |
void |
delayedMapObjectResult(UserSession userSession,
MapObject mappedObject,
AuthenticationResult result)
Use to provide a delayed result for a
Authenticator.mapObject call. |
void delayedCheckUserResult(UserSession userSession, AuthenticationResult result)
Authenticator.checkUser
call.userSession
- the UserSession that was passed in the checkUser call.result
- the delayed AuthenticationResultvoid delayedMapObjectResult(UserSession userSession, MapObject mappedObject, AuthenticationResult result)
Authenticator.mapObject
call.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.void delayedCheckWriteResult(UserSession userSession, RTTPObject object, java.lang.String contributionId, AuthenticationResult result)
Authenticator.checkWrite
call.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 AuthenticationResultPlease send bug reports and comments to Caplin support