Previous Topic: SignChallengeEx()Next Topic: IsArcotIDAvailable()


ImportArcotID()

This method is used to download the ArcotID PKI from the server. The wallet name will be generated based on the internal wallet name of the ArcotID PKI. If the internal wallet name is not present, then the wallet’s User ID will be used as the wallet name.

This single API call replaces the previous sequence of:

In ArcotID PKI Javascript Client 6.0.4.3:

Syntax for ArcotID PKI Javascript Client 6.0.4.3

boolean ImportArcotID(walletEncoding, StorageType, userName, propertyObject)

Syntax for the Other Clients

boolean ImportArcotID(walletEncoding, StorageType, userName)

Parameters

The following are the parameters of this method:

Parameter

Type

Description

walletEncoding

string

Base-64 encoded string of the wallet to import.

StorageType

string

Specifies the medium, where the ArcotID PKI is stored. See "StorageType" for more information.

userName

string

User name and alias, which are the unique user identifier associated with the Arcot card.

Note: The alias is obtained from the user and stored in the ArcotID PKI as an attribute with the specified application context.

propertyObject

property object

Contains the StorageMode property. The value of this property is set to either Shared or User to indicate that the ArcotID PKI must be stored in the central device store or the user store, respectively. If this property is not set, the user store is used as the default.

Note: This parameter is available only in ArcotID PKI Javascript Client 6.0.4.3. It will be ignored by the other clients.

Returns

If the method is successful, then it returns TRUE. If the method is unsuccessful, then it returns FALSE.

Example for ArcotID PKI Javascript Client 6.0.4.3

var arcotClient = new ArcotClient();
var b64wallet = "MII0yAIBAAwHY3Rnb29kMTCCNDcwgjQzAgEBDAR
                 jYXJkoIHFMB8GCmCGSAGG+UYJAQEwEQQAAgEBAg
                 ILAgICAegCAgMYBIGhMIGeAgEAMA4GCmCGSA GG+
                 UYJAgAFAASBiDCBhQJBAMzNUdGcaBZsiAt/88Dk9... ";
var user = "jdoe-sb";
var props = {StorageMode:"Shared"};
// Import wallet and allow it to be saved on hard disk or memory only
var returnValue = arcotClient.ImportArcotID(b64wallet, "hd_memory", user, props);

Example for the Other Clients

var arcotClient = new ArcotClient();
var b64wallet = "MII0yAIBAAwHY3Rnb29kMTCCNDcwgjQzAgEBDAR
                 jYXJkoIHFMB8GCmCGSAGG+UYJAQEwEQQAAgEBAg
                 ILAgICAegCAgMYBIGhMIGeAgEAMA4GCmCGSA GG+
                 UYJAgAFAASBiDCBhQJBAMzNUdGcaBZsiAt/88Dk9... ";
var user = "jdoe-sb";
// Import wallet and allow it to be saved on hard disk or memory only
var returnValue = arcotClient.ImportArcotID(b64wallet, "hd_memory", user);