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

Encapsulates an active service container instance. More...

#import <HIDContainer.h>

Instance Methods

(BOOL) - addKey:withProtectionPolicyId:withPassword:error:
 Adds a key to the container. More...
 
(NSArray *) - findKeys:error:
 Retrieves a key handle from the secure keystore based on input parameter filter. More...
 
(NSDate *) - getCreationDate:
 Gets the activation or renewal creation date for this container. More...
 
(NSDate *) - getExpiryDate:
 Gets the server defined expiration date this container. More...
 
(NSInteger) - getId
 Get the identifier of this container. More...
 
(NSString *) - getName
 Gets the Friendly Name associated with this container. More...
 
(NSDate *) - getOriginalCreationDate:
 Gets the first creation date of this container. More...
 
(NSString *) - getProperty:error:
 Returns container property. More...
 
(id< HIDProtectionPolicy >) - getProtectionPolicy:
 Gets the protection policy associated with container. More...
 
(NSDate *) - getRenewalDate:
 Gets the renewal date limit for this container to remain fully functional (support is limited or not working after this date). More...
 
(NSString *) - getServerURL
 Gets the server URL associated with this 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:
 Triggers the container service key renewal process with the server for all container keys. 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 this container. More...
 
(BOOL) - setProperty:withValue:error:
 Overrides a container property. More...
 
(BOOL) - updateDeviceInfo:withValue:withPassword:withParams:error:
 Updates container information. More...
 

Detailed Description

Encapsulates an active 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.
- (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. (or nil for all keys)

Parameter can b defined with the following id:

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

Gets the activation or renewal creation date for this container.

Parameters
errorerror details. It may be nil.

Possible error codes are:

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

Gets the server defined expiration date this container.

Parameters
errorerror details. It may be nil.

Possible error codes are:

Returns
the expire date
- (NSInteger) getId

Get the identifier of this container.

Returns
The identifier.
- (NSString*) getName

Gets the Friendly Name associated with this container.

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

Gets the first creation date of this container.

Parameters
errorerror details. It may be nil.

Possible error codes are:

Returns
the first creation date
- (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 HIDProtectionPolicy used to protect the key, nil if an error occurs.
- (NSDate*) getRenewalDate: (NSError **)  error

Gets the renewal date limit for this container to remain fully functional (support is limited or not working after this 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 this 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 

Triggers the container service key renewal process with the server for all container keys.

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 this container.

Parameters
nameFriendly name of container. (expected max 128 characters)
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. (expected max 128 characters)
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.