HID APPROVE SDK  5.9
HID Approve SDK for iOS
 All Classes Files Functions Variables Enumerations Enumerator Properties Pages
<HIDContainer> Protocol Reference

Service container instance. More...

#import <HIDContainer.h>

Instance Methods

(BOOL) - addKey:withProtectionPolicyId:withPassword:error:
 Adds a key to the container. More...
 
(BOOL) - deleteKey:withParams:error:
 Deletes the key identified by its ID. (RFU) More...
 
(NSArray *) - findKeys:error:
 Retrieves a key handle from the secure keystore based on input parameter filter. More...
 
(NSDate *) - getCreationDate:
 Retrieves the container creation date. More...
 
(NSDate *) - getExpiryDate:
 Retrieve the container expiration date. More...
 
(NSInteger) - getId
 Get the identifier of that container. More...
 
(NSString *) - getName
 Gets the Friendly Name associated with that container. More...
 
(NSDate *) - getOriginalCreationDate:
 Retrieves the container original creation date. More...
 
(NSString *) - getProperty:error:
 Returns container property. More...
 
(id< HIDProtectionPolicy >) - getProtectionPolicy:
 Gets the protection policy associated with container. More...
 
(NSDate *) - getRenewalDate:
 Retrieve the container renewal date. More...
 
(NSString *) - getServerURL
 Gets the server URL associated with that container. More...
 
(NSString *) - getUserId
 Gets the identifier of the user for this container. More...
 
(BOOL) - isFIPSModeEnabled
 Checks if FIPS 140-2 mode is required. More...
 
(Boolean) - isRenewable:error:
 Verify whether the container renewal is possible. More...
 
(Boolean) - renew:withSessionPassword:withListener:error:
 Renew all keys associated with the container. More...
 
(NSArray *) - retrieveTransactionIds:withParams:error:
 Retrieve a list of pending transaction IDs from the container. More...
 
(BOOL) - setConnectionConfiguration:error:
 Sets connection configuration. More...
 
(BOOL) - setName:error:
 Sets the Friendly Name associated with that container. More...
 
(BOOL) - setProperty:withValue:error:
 Overrides a container property. More...
 
(BOOL) - updateDeviceInfo:withValue:withPassword:withParams:error:
 Updates container information. More...
 

Detailed Description

Service container instance.

Method Documentation

- (BOOL) addKey: (HIDKeySpec *)  keySpec
withProtectionPolicyId: (HIDIdentifier *)  protectionPolicyId
withPassword: (NSString *)  password
error: (NSError **)  error 

Adds a key to the container.

Parameters
keySpecthe specification containing the key data (expect JWS formatted key).
protectionPolicyIdthe protection policy Id for that key.
passwordThe password protecting that key. It can be set to nil if the protection policy does not require password to be set.
errorerror details. It may be nil.

Possible error codes are:

Returns
false if error occurs.
- (BOOL) deleteKey: (HIDIdentifier *)  keyId
withParams: (NSArray *)  parameters
error: (NSError **)  error 

Deletes the key identified by its ID. (RFU)

Parameters
keyIdkey identifier.
parametersNSArray of HIDParameter objects for any additional parameters.
errorerror details. It may be nil.

Possible error codes are:

Returns
YES if deleteKey was successfully called.
- (NSArray*) findKeys: (NSArray *)  filter
error: (NSError **)  error 

Retrieves a key handle from the secure keystore based on input parameter filter.

Parameters
filterNSArray of HIDParameter objects with key property name and value.

The property name may be any of the following:

Parameters
errorerror details. It may be nil.

Possible error codes are:

Returns
The HIDIdentifier array of matching key items, nil if an error occurs.
- (NSDate*) getCreationDate: (NSError **)  error

Retrieves the container creation date.

Parameters
errorerror details. It may be nil.

Possible error codes are:

Returns
the creation date of container
- (NSDate*) getExpiryDate: (NSError **)  error

Retrieve the container expiration date.

Parameters
errorerror details. It may be nil.

Possible error codes are:

Returns
the expiration date of container
- (NSInteger) getId

Get the identifier of that container.

Returns
The identifier.
- (NSString*) getName

Gets the Friendly Name associated with that container.

Returns
The NSString name.
- (NSDate*) getOriginalCreationDate: (NSError **)  error

Retrieves the container original creation date.

Parameters
errorerror details. It may be nil.

Possible error codes are:

Returns
the creation date of container
- (NSString*) getProperty: (NSString *)  propertyId
error: (NSError **)  error 

Returns container property.

Parameters
propertyIdproperty name.

Supported property names:

Parameters
errorerror details. It may be nil.

Possible error codes are:

Returns
The property value, nil if an error occurs.
- (id<HIDProtectionPolicy>) getProtectionPolicy: (NSError **)  error

Gets the protection policy associated with container.

Parameters
errorerror details. It may be nil.

Possible error codes are:

Returns
the ProtectionPolicy used to protect the key, nil if an error occurs.
- (NSDate*) getRenewalDate: (NSError **)  error

Retrieve the container renewal date.

Parameters
errorerror details. It may be nil.

Possible error codes are:

Returns
the renewal date of container
- (NSString*) getServerURL

Gets the server URL associated with that container.

Returns
The NSString URL.
- (NSString*) getUserId

Gets the identifier of the user for this container.

Returns
Container user identifier
- (BOOL) isFIPSModeEnabled

Checks if FIPS 140-2 mode is required.

Returns
YES if the container instance has FIPS mode enabled.
- (Boolean) isRenewable: (NSString *)  sessionPassword
error: (NSError **)  error 

Verify whether the container renewal is possible.

Parameters
sessionPasswordtransaction protection key password (can be nil if not required by the policy)
errorerror details. It may be nil.

Possible error codes are:

  • HIDInternal if container is not renewable or unexpected error occurs
Returns
YES if the container is renewable.
- (Boolean) renew: (HIDContainerRenewal *)  config
withSessionPassword: (NSString *)  sessionPassword
withListener: (NSObject< HIDProgressListener > *)  listener
error: (NSError **)  error 

Renew all keys associated with the container.

Parameters
configrenewal configuration see HIDContainerRenewal for details
sessionPasswordtransaction protection key password (can be nil if not required by the policy)
listenerA HIDProgressListener implementation to which to report status information or receive password request events.
errorerror details. It may be nil.

Possible error codes are:

Returns
the container or nil if an error occurs.
- (NSArray*) retrieveTransactionIds: (NSString *)  sessionPassword
withParams: (NSArray *)  parameters
error: (NSError **)  error 

Retrieve a list of pending transaction IDs from the container.

Parameters
sessionPasswordtransaction protection key password (can be nil if not required by the policy)
parametersempty (reserved for future use)
errorerror details. It may be nil.

Possible error codes are:

Returns
the Array of transaction id values, nil if an error occurs.
- (BOOL) setConnectionConfiguration: (HIDConnectionConfiguration *)  config
error: (NSError **)  error 

Sets connection configuration.

Parameters
configconfiguration, see HIDConnectionConfiguration for details.
errorerror details. It may be nil.

Possible error codes are:

Returns
false if error occurs
- (BOOL) setName: (NSString *)  name
error: (NSError **)  error 

Sets the Friendly Name associated with that container.

Parameters
nameFriendly name of container.
errorerror details. It may be nil.

Possible error codes are:

Returns
YES if property value was successfully updated.
- (BOOL) setProperty: (NSString *)  propertyId
withValue: (NSString *)  propertyValue
error: (NSError **)  error 

Overrides a container property.

Parameters
propertyIdproperty name.

Supported property names:

Parameters
propertyValueproperty value.
errorerror details. It may be nil.

Possible error codes are:

Returns
YES if property has been successfully set.
- (BOOL) updateDeviceInfo: (NSString *)  propertyId
withValue: (NSString *)  propertyValue
withPassword: (NSString *)  sessionPassword
withParams: (NSArray *)  parameters
error: (NSError **)  error 

Updates container information.

This method is used by the application to notify of a change in one of the externally generated device attributes.

Parameters
propertyIddeviceInfo property to update.

Supported name attributes:

  • HID_DEVICE_INFO_PUSHID: update of the 'pushId', set up at provisioning and used by the server to notify the correct phone. Value may be null or empty to disable push notification for device.
  • HID_DEVICE_INFO_NAME: update of the device friendly name, set up at provisioning and used by the server to identify the correct phone.
Parameters
propertyValuethe new value to replace.
sessionPasswordtransaction protection key password (can be nil if not required by the policy)
parametersempty (reserved for future use)
errorerror details. It may be nil.

Possible error codes are:

Returns
YES if property value was successfully updated.