VSSClient Class Reference
Inherits from | VSSBaseClient : NSObject |
---|---|
Declared in | VSSClient.h |
Public keys related functionality
– getPublicKeyWithId:completionHandler:
Gets public key instance from the Virgil Keys Service. This method sends unauthenticated request, so the returned public key will contain only id, actual public key data and creation date. There will not be an array of cards for the key returned. Use authenticated request instead.
- (void)getPublicKeyWithId:(GUID *__nonnull)keyId completionHandler:(void ( ^ __nullable ) ( VSSPublicKey *__nullable key , NSError *__nullable error ))completionHandler
Parameters
keyId |
GUID containing the public key id of the key which should be get. |
---|---|
completionHandler |
Callback handler which will be called after request completed. |
Declared In
VSSClient.h
– getPublicKeyWithId:card:privateKey:completionHandler:
Gets public key instance from the Virgil Keys Service. This method sends authenticated request, so the returned public key will contain an array of cards for the public key as well as all other key’s data.
- (void)getPublicKeyWithId:(GUID *__nonnull)keyId card:(VSSCard *__nonnull)card privateKey:(VSSPrivateKey *__nonnull)privateKey completionHandler:(void ( ^ __nullable ) ( VSSPublicKeyExtended *__nullable key , NSError *__nullable error ))completionHandler
Parameters
keyId |
GUID containing the public key id of the key which should be get. |
---|---|
card |
VSSCard which should be used for authenticated request. |
privateKey |
VSSPrivateKey which will be used to compose the signature for authentication. |
completionHandler |
Callback handler which will be called after request completed. |
Declared In
VSSClient.h
– deletePublicKeyWithId:identityInfoList:card:privateKey:completionHandler:
Deletes public key instance from the Virgil Keys Service. This method sends authenticated request.
- (void)deletePublicKeyWithId:(GUID *__nonnull)keyId identityInfoList:(NSArray<VSSIdentityInfo*> *__nonnull)identityInfoList card:(VSSCard *__nonnull)card privateKey:(VSSPrivateKey *__nonnull)privateKey completionHandler:(void ( ^ __nullable ) ( NSError *__nullable error ))completionHandler
Parameters
keyId |
GUID containing the public key id of the key which should be get. |
---|---|
identityInfoList |
NSArray of VSSIdentityInfo objects. |
card |
VSSCard which should be used for authenticated request. |
privateKey |
VSSPrivateKey which will be used to compose the signature for authentication. |
completionHandler |
Callback handler which will be called after request completed. |
Declared In
VSSClient.h
Virgil Cards related functionality
– createCardWithPublicKeyId:identityInfo:data:privateKey:completionHandler:
Creates Virgil Card instance on the Virgil Keys Service and associates it with the public key with given ID.
- (void)createCardWithPublicKeyId:(GUID *__nonnull)keyId identityInfo:(VSSIdentityInfo *__nonnull)identityInfo data:(NSDictionary *__nullable)data privateKey:(VSSPrivateKey *__nonnull)privateKey completionHandler:(void ( ^ __nullable ) ( VSSCard *__nullable card , NSError *__nullable error ))completionHandler
Parameters
keyId |
GUID public key identifier to associate this card with. |
---|---|
identityInfo |
VSSIdentityInfo containing the identity information. |
data |
NSDictionary<String, String> object containing the custom key-value pairs associated with this card. May be nil. |
privateKey |
VSSPrivateKey container with private key data and password if any. |
completionHandler |
Callback handler which will be called after request completed. |
Declared In
VSSClient.h
– createCardWithPublicKey:identityInfo:data:privateKey:completionHandler:
Creates Virgil Card instance on the Virgil Keys Service with given public key data.
- (void)createCardWithPublicKey:(NSData *__nonnull)key identityInfo:(VSSIdentityInfo *__nonnull)identityInfo data:(NSDictionary *__nullable)data privateKey:(VSSPrivateKey *__nonnull)privateKey completionHandler:(void ( ^ __nullable ) ( VSSCard *__nullable card , NSError *__nullable error ))completionHandler
Parameters
key |
Public key data to associate this card with. |
---|---|
identityInfo |
VSSIdentityInfo containing the identity information. |
data |
NSDictionary<String, String> object containing the custom key-value pairs associated with this card. May be nil. |
privateKey |
VSSPrivateKey container with private key data and password if any. |
completionHandler |
Callback handler which will be called after request completed. |
Declared In
VSSClient.h
– getCardWithCardId:completionHandler:
Gets Virgil Card with given id from the Virgil Keys Service.
- (void)getCardWithCardId:(GUID *__nonnull)cardId completionHandler:(void ( ^ __nullable ) ( VSSCard *__nullable card , NSError *__nullable error ))completionHandler
Parameters
cardId |
GUID identifier of the card. |
---|---|
completionHandler |
Callback handler which will be called after request completed. |
Declared In
VSSClient.h
– searchCardWithIdentityValue:type:unauthorized:completionHandler:
Performs search of the private cards only with given parameters on the Virgil Keys Service. The cards array in callback of this method will NOT return global cards, even if type is set to VSSIdentityTypeApplication or VSSIdentityTypeEmail
- (void)searchCardWithIdentityValue:(NSString *__nonnull)value type:(NSString *__nullable)type unauthorized:(BOOL)unauthorized completionHandler:(void ( ^ __nullable ) ( NSArray<VSSCard*> *__nullable cards , NSError *__nullable error ))completionHandler
Parameters
value |
NSString Identity value for the card to search. |
---|---|
type |
NSString type of identity. May be nil. |
unauthorized |
BOOL In case of NO - unauthorized cards will not be returned in the array of cards in callback. |
completionHandler |
Callback handler which will be called after request completed. |
Declared In
VSSClient.h
– searchAppCardWithIdentityValue:completionHandler:
Performs search of the global cards only with type VSSIdentityTypeApplication with given parameters on the Virgil Keys Service. The cards array in callback of this method will not return private cards even if type is the same.
- (void)searchAppCardWithIdentityValue:(NSString *__nonnull)value completionHandler:(void ( ^ __nullable ) ( NSArray<VSSCard*> *__nullable cards , NSError *__nullable error ))completionHandler
Parameters
value |
NSString value of the app identity associated with required global Virgil Card. |
---|---|
completionHandler |
Callback handler which will be called after request completed. |
Declared In
VSSClient.h
– searchEmailCardWithIdentityValue:completionHandler:
Performs search of the global cards only with type VSSIdentityTypeEmail with given parameters on the Virgil Keys Service. The cards array in callback of this method will not return private cards even if type is the same.
- (void)searchEmailCardWithIdentityValue:(NSString *__nonnull)value completionHandler:(void ( ^ __nullable ) ( NSArray<VSSCard*> *__nullable cards , NSError *__nullable error ))completionHandler
Parameters
value |
NSString value of the email identity associated with required global Virgil Card. |
---|---|
completionHandler |
Callback handler which will be called after request completed. |
Declared In
VSSClient.h
– deleteCardWithCardId:identityInfo:privateKey:completionHandler:
Deletes the Virgil Card with given cardId and identity from the Virgil Keys Service.
- (void)deleteCardWithCardId:(GUID *__nonnull)cardId identityInfo:(VSSIdentityInfo *__nullable)identityInfo privateKey:(VSSPrivateKey *__nonnull)privateKey completionHandler:(void ( ^ __nullable ) ( NSError *__nullable error ))completionHandler
Parameters
cardId |
GUID identifier of the card which is needs to be deleted. |
---|---|
identityInfo |
VSSIdentityInfo containing the identity information. May be nil for unconfirmed Virgil Cards. |
privateKey |
VSSPrivateKey container with private key data and password if any. |
completionHandler |
Callback handler which will be called after request completed. |
Declared In
VSSClient.h
Identities related functionality
– verifyEmailIdentityWithValue:extraFields:completionHandler:
Initiates email identity global verification flow for given identity with extra information.
- (void)verifyEmailIdentityWithValue:(NSString *__nonnull)value extraFields:(NSDictionary *__nullable)extraFields completionHandler:(void ( ^ __nullable ) ( GUID *__nullable actionId , NSError *__nullable error ))completionHandler
Parameters
value |
NSString value of the identity which have to be verified. The only supported type for now is VSSIdentityTypeEmail. |
---|---|
extraFields |
NSDictionary<NSString, NSString> containing required extra key-value pairs to be used in verification process. |
completionHandler |
Callback handler which will be called after request completed. |
Declared In
VSSClient.h
– confirmEmailIdentityWithActionId:code:tokenTtl:tokenCtl:completionHandler:
Completes email identity global verification flow by action id and using confirmation code.
- (void)confirmEmailIdentityWithActionId:(GUID *__nonnull)actionId code:(NSString *__nonnull)code tokenTtl:(NSUInteger)tokenTtl tokenCtl:(NSUInteger)tokenCtl completionHandler:(void ( ^ __nullable ) ( VSSIdentityInfo *__nullable identityInfo , NSError *__nullable error ))completionHandler
Parameters
actionId |
GUID identifier of the verification identity flow returned in callback of -verifyIdentity… |
---|---|
code |
NSString Confirmation code received from the user. |
tokenTtl |
NSUInteger with token’s ‘time to live’ parameter for the limitations of the token’s lifetime in seconds: (maximum value is 60 * 60 * 24 * 365 = 1 year). Default value is 3600. In case of 0 - default value will be used by the SDK. |
tokenCtl |
NSUInteger with token’s ‘count to live’ parameter to restrict the number of token usages (maximum value is 100). Default value is 1. In case of 0 - default value will be used by the SDK. |
completionHandler |
Callback handler which will be called after request completed. |
Declared In
VSSClient.h
Private keys related functionality
– storePrivateKey:cardId:completionHandler:
Stores the private key instance on the Virgil Private Keys Service.
- (void)storePrivateKey:(VSSPrivateKey *__nonnull)privateKey cardId:(GUID *__nonnull)cardId completionHandler:(void ( ^ __nullable ) ( NSError *__nullable error ))completionHandler
Parameters
privateKey |
VSSPrivateKey containing the private key data and password if any. |
---|---|
cardId |
GUID identifier of the correspondent Virgil Card stored on the Virgil Keys Service. |
completionHandler |
Callback handler which will be called after request completed. |
Declared In
VSSClient.h
– getPrivateKeyWithCardId:identityInfo:password:completionHandler:
Gets the private key instance from the Virgil Private Keys Service.
- (void)getPrivateKeyWithCardId:(GUID *__nonnull)cardId identityInfo:(VSSIdentityInfo *__nonnull)identityInfo password:(NSString *__nullable)password completionHandler:(void ( ^ __nullable ) ( NSData *__nullable keyData , GUID *__nullable cardId , NSError *__nullable error ))completionHandler
Parameters
cardId |
GUID identifier of the correspondent Virgil Card stored on the Virgil Keys Service. |
---|---|
identityInfo |
VSSIdentityInfo containing the identity information. |
password |
NSString password which will be used by the Virgil Private Keys Service for response encryption. If password is nil then random password will be generated by the SDK for this single request. |
completionHandler |
Callback handler which will be called after request completed. |
Declared In
VSSClient.h
– deletePrivateKey:cardId:completionHandler:
Deletes the private key instance from the Virgil Private Keys Service.
- (void)deletePrivateKey:(VSSPrivateKey *__nonnull)privateKey cardId:(GUID *__nonnull)cardId completionHandler:(void ( ^ __nullable ) ( NSError *__nullable error ))completionHandler
Parameters
privateKey |
VSSPrivateKey containing the private key data and password if any. |
---|---|
cardId |
GUID identifier of the correspondent Virgil Card stored on the Virgil Keys Service. |
completionHandler |
Callback handler which will be called after request completed. |
Declared In
VSSClient.h