Package com.caplin.server.auth
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 Summary
Modifier and TypeMethodDescriptionvoiddelayedCheckUserResult(UserSession userSession, AuthenticationResult result) This method should be called when providing a delayed result from aAuthenticator.checkUsercall.voiddelayedCheckWriteResult(UserSession userSession, RTTPObject object, String contributionId, AuthenticationResult result) Use to provide a delayed result for aAuthenticator.checkWritecall.voiddelayedMapObjectResult(UserSession userSession, MapObject mappedObject, AuthenticationResult result) Use to provide a delayed result for aAuthenticator.mapObjectcall.
-
Method Details
-
delayedCheckUserResult
This method should be called when providing a delayed result from aAuthenticator.checkUsercall.- 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 aAuthenticator.mapObjectcall.- Parameters:
userSession- the UserSession that was passed in the mapObject call.mappedObject- theMapObjectthat was passed in the mapObject call with the mapped object name set if appropriate.result-AuthenticationResult.OKif the object name was mapped orAuthenticationResult.FALSEif the object name was not mapped.
-
delayedCheckWriteResult
void delayedCheckWriteResult(UserSession userSession, RTTPObject object, String contributionId, AuthenticationResult result) Use to provide a delayed result for aAuthenticator.checkWritecall.- 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
-