HID APPROVE SDK  5.11
HID Approve SDK for Android
com.hidglobal.ia.service.transaction.Transaction Interface Reference

Encapsulates a transaction and exposes an API to apply an action status and context. More...

Inheritance diagram for com.hidglobal.ia.service.transaction.Transaction:
com.hidglobal.ia.service.transaction.ServerAction

Public Member Functions

String getAction ()
 
String [] getAllowedStatuses ()
 
Key getSigningKey () throws InternalException, UnsupportedDeviceException, UnsafeDeviceException
 
boolean setStatus (String status, char[] signingPassword, char[] sessionPassword, Parameter[] param) throws AuthenticationException, PasswordExpiredException, TransactionExpiredException, ServerVersionException, UnsupportedDeviceException, RemoteException, LostCredentialsException, InternalException, PasswordRequiredException, FingerprintAuthenticationRequiredException,ServerAuthenticationException, ServerOperationFailedException, InvalidParameterException
 
- Public Member Functions inherited from com.hidglobal.ia.service.transaction.ServerAction
Date getDate ()
 
Date getExpiryDate ()
 
String getPayload ()
 
String toString ()
 

Detailed Description

Encapsulates a transaction and exposes an API to apply an action status and context.

Member Function Documentation

◆ getAction()

String com.hidglobal.ia.service.transaction.Transaction.getAction ( )

Returns the nature of the action.

Returns
SDKConstants.ACTION_TRANSACTION

Implements com.hidglobal.ia.service.transaction.ServerAction.

◆ getAllowedStatuses()

String [] com.hidglobal.ia.service.transaction.Transaction.getAllowedStatuses ( )

Returns a list of status (for instance "accept", "deny", "report") that can be set for that transaction.

The values are retrieved from the transaction response message sent back by the server. The returned names can be used by the calling application to look up the corresponding value in a name, value pair resource files for customization/localization of displayed text to user.

Returns
the String array contains the possible status values to be used with setStatus.
See also
Transaction#setStatus(String, char[], char[], Parameter[])

◆ getSigningKey()

Key com.hidglobal.ia.service.transaction.Transaction.getSigningKey ( ) throws InternalException, UnsupportedDeviceException, UnsafeDeviceException

Gets the Signing Key object associated with that transaction.

Returns
the key
Exceptions
InternalExceptionif an unexpected error occurred.
UnsupportedDeviceExceptionif device is not supported by policy.
UnsafeDeviceExceptionif the mobile is not protected by a password.

◆ setStatus()

Communicates the status and context information of this transaction along with cryptographic signature.

Parameters
statusstatus to apply to transaction with signature. The status must be one of the statuses returned by the getAllowedStatuses() method.
signingPasswordthe password protecting the signature key. (can be null if not required by the policy)
sessionPasswordtransaction protection key password (can be null if not required by the policy)
paramarray of Parameter objects

Parameter can be defined with following id:

Returns
boolean true if successful.
Exceptions
AuthenticationExceptionif password is incorrect.
PasswordExpiredExceptionif expired password is given (changePassword required).
TransactionExpiredExceptionif transaction has expired.
ServerVersionExceptionif server version does not support client operation.
RemoteExceptionif server responds with any other error.
LostCredentialsExceptionif device key has been lost. A new provisioning is needed.
InternalExceptionif an unexpected error occurred.
PasswordRequiredExceptionif required password was not provided and cached password is not available.
FingerprintAuthenticationRequiredExceptionif fingerprint authentication is required by policy.
ServerOperationFailedExceptionif the server encounters a failure for the operation requested.
ServerAuthenticationExceptionif the transaction protection key is not rejected by the server.
InvalidParameterExceptionif the given parameters are invalid or required parameters are missing.
UnsupportedDeviceExceptionif device is not supported by policy.
See also
Container#findKeys(Parameter[])
ServerActionInfo::getProtectionKey()
Transaction::getSigningKey()