Syntax
ConsumerAuthenticationResult
authenticate
(
final Long
authId
,
final AuthenticationMethodComputation
computeRules
,
final ITransactionCredential
credential
,
final Long
actorId
) throws MobiliserServiceException, DataAccessException, TransactionException
Parameters
-
authId –
the id of the authorisation transaction to authenticate
-
computeRules –
the authentication rules
-
credential –
the credential to use for authentication
-
actorId –
the actorId (authenticated user)
Returns
the result of the authentication
Exceptions
-
MobiliserServiceException –
if authentication fails for some reason (business rules)
-
DataAccessException –
if some error occurs communicating / writing / reading persistent storage
-
TransactionException –
if some error occurs while handling the transactions related to persistent storage
Usage
Authenticate the
Authorisation
based on the previously computed authentication method.
Notes on transactional semantics:
If a business logic exception occurs, a
MobiliserServiceException
will be thrown and the
Authorisation
and the main
Transaction
will be marked with the error code from the exception and the database transaction committed. Any other exception will trigger a rollback of the database transaction followed by a fresh transaction inside of which the
Authorisation
and the main
Transaction
will be marked with an error code.
the result of the authentication