HID APPROVE SDK  6.0
HID Approve SDK for iOS/macOS
 All Classes Files Functions Variables Enumerations Enumerator Properties Pages
<HIDTransaction> Protocol Reference

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

#import <HIDTransaction.h>

Inheritance diagram for <HIDTransaction>:
<HIDServerAction>

Instance Methods

(BOOL) - cancel:withCancelationReason:withSessionPassword:error:
 Cancel/delete an existing pending transaction on the server. More...
 
(NSString *) - getAction:
 Returns the nature of the action. More...
 
(NSArray *) - getAllowedStatuses
 Returns a list of status (for instance "accept", "deny", "report") that can be set for that transaction. More...
 
(NSDate *) - getDate:
 Gets status change date for the transaction. More...
 
(NSDate *) - getExpiryDate:
 Returns Retrieves the expiration date associated with requested action. More...
 
(NSString *) - getIdToken:
 Gets the signed OIDC ID Token associated with the signed transaction. More...
 
(NSString *) - getRequestId:
 Gets the CIBA authentication request id associated with the signed transaction. More...
 
(id< HIDKey >) - getSigningKey:
 Gets the Signing Key object associated with that transaction. More...
 
(BOOL) - isCancelable
 Checks if the server supports canceling the transaction. More...
 
(BOOL) - setStatus:withSigningPassword:withSessionPassword:withParams:error:
 Communicates the status and context information of this transaction along with cryptographic signature. More...
 
(NSString *) - toString
 Returns the transaction text to be displayed to the user. More...
 
- Instance Methods inherited from <HIDServerAction>
(NSString *) - getPayload:
 Returns an optional payload related to the request action. More...
 

Detailed Description

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

Method Documentation

- (BOOL) cancel: (NSString *)  message
withCancelationReason: (HIDCancelationReasonCode)  reason
withSessionPassword: (NSString *)  sessionPassword
error: (NSError **)  error 

Cancel/delete an existing pending transaction on the server.

Parameters
messageOptional message to be audited with action (default: "not specified by HID Approve SDK integrator") (expected max 1000 characters)
reasonDefines the reason for cancellation (for example fraudulent/suspicious transaction).
sessionPasswordTransaction protection key password (can be nil if not required by the policy).
errorerror details. It may be nil.

Possible error codes are:

- (NSString*) getAction: (NSError **)  error

Returns the nature of the action.

Parameters
errorerror details. It may be nil.

Possible error codes are:

Returns
the nature of the action, nil if not set yet or an error occurs.

Reimplemented from <HIDServerAction>.

- (NSArray*) getAllowedStatuses

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

Returns
the NSString array contains the possible status values to be used with setStatus.
See also
- setStatus:withSigningPassword:withSessionPassword:withParams:error:

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 file for customization/localization of displayed text to user.

- (NSDate*) getDate: (NSError **)  error

Gets status change date for the transaction.

Parameters
errorerror details. It may be nil.

Possible error codes are:

Returns
the date, nil if not set yet or an error occurs.

Reimplemented from <HIDServerAction>.

- (NSDate*) getExpiryDate: (NSError **)  error

Returns Retrieves the expiration date associated with requested action.

Parameters
errorerror details. It may be nil.

Possible error codes are:

Returns
the date, nil if not set yet or an error occurs.

Reimplemented from <HIDServerAction>.

- (NSString*) getIdToken: (NSError **)  error

Gets the signed OIDC ID Token associated with the signed transaction.

Returns
The ID Token as a string.
- (NSString*) getRequestId: (NSError **)  error

Gets the CIBA authentication request id associated with the signed transaction.

Returns
The request ID as a string.
- (id<HIDKey>) getSigningKey: (NSError **)  error

Gets the Signing Key object associated with that transaction.

Parameters
errorerror details. It may be nil.

Possible error codes are:

Returns
the key, nil if an error occurs.
- (BOOL) isCancelable

Checks if the server supports canceling the transaction.

Returns
return true if the transaction is cancelable
- (BOOL) setStatus: (NSString *)  status
withSigningPassword: (NSString *)  signPassword
withSessionPassword: (NSString *)  sessionPassword
withParams: (NSArray *)  parameters
error: (NSError **)  error 

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.

Parameters
signPasswordthe password protecting the signature key. (can be nil if not required by the policy)
sessionPasswordtransaction protection key password (can be nil if not required by the policy)
parametersarray of NSParameter objects

Parameter can be defined with following id:

Parameters
errorerror details. It may be nil.

Possible error codes are:

Returns
boolean true if successful.
See also
HIDContainer::findKeys:error:
HIDServerActionInfo::getProtectionKey:
HIDTransaction::getSigningKey:
- (NSString*) toString

Returns the transaction text to be displayed to the user.

Returns
Transaction text string.

Reimplemented from <HIDServerAction>.