HID APPROVE SDK  5.12
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

(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...
 
(id< HIDKey >) - getSigningKey:
 Gets the Signing Key object associated with that 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

- (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>.

- (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) 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>.