Previous Topic: GetVersion()Next Topic: SetAttribute()


GetGlobalAttribute()

Retrieves attribute values from the plug-in, applet, or from a specific ArcotID PKI. Not all ArcotID PKI attributes can be retrieved by using this API.

Syntax

string GetGlobalAttribute(attributeName)

Parameters

The following are the parameters of this method:

Parameter

Type

Description

attributeName

string

The attribute you are requesting.

Returns

If successful, then it returns the Arcot card attribute you requested.

Discussion

Attributes allow you to set information that will persist in the plug-in till the browser session is closed. You can create your own attributes by using SetAttribute() or you can use special pre-defined attributes to obtain specific information about Arcot wallets and cards. Pre-defined attributes include:

Attribute

Description

walletn:count

Indicates the number of ArcotID PKIs present on the client.

walletn:x:name

Indicates the name of specific wallet.

Example

var arcotClient = new ArcotClient();
var i = 0;
var walletname;

// Get the number of wallets
var walletcount = arcotClient.GetGlobalAttribute("walletn.count");

// Print out the names of all the wallets
for (i = 0; i < walletcount; i++)
{
    walletname = arcotClient.GetGlobalAttribute("walletn:" + i +  ":name");
    document.write("<P>" + walletname + "</P>");
}