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.
aa813test
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:
  • Javascript call to SetAttribute("WalletInMemory", true | false). This indicates if the download will be temporary (memory only) or permanent (ArcotID PKI saved to disk).
  • Javascript call to SetCurrentWalletFromEncoding(walletEncoding). This function takes the wallet encoding as a base-64 encoded string and saves it to memory as the current wallet.
  • Javascript function, SetCurrentCardByIndex(0). This sets the "current card" to be the first card in the current wallet.
  • Javascript function, AddCurrentCardToWallet(walletName). This stores the previously specified "current card" to a new wallet stored on the hard disk or memory. The parameter walletName is used as part of the file name for a wallet that is stored to disk.
In ArcotID PKI Javascript Client 6.0.4.3:
  • To indicate to the API that the ArcotID PKI must be stored in the central device store, set the value of the StorageMode property to Shared in the props object that is passed to the API.
  • To indicate that the ArcotID PKI must be stored in the user store, set the value of the StorageMode property to User.
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);