How to develop a web application using ArcotID Javascript client?
Authminder: 8.0
JS library: 6.0.6
Below code snippet can be used as a reference while developing an application using ArcotID Javascript library:-
1. To initialize the ArcotID Javascript client, client type should be set as Javascript:
function initArcotIDClient()
{
//Create the Arcot client
arcotClient = new ArcotClient();
arcotClient.setAttribute("clientType", "Javascript");
// The clientBaseURL is the location where the client (Flash, applet, or ActiveX) is present.
arcotClient.setAttribute("clientBaseURL", clientPath);
// This callback is invoked when the client is loaded successfully
arcotClient.setAttribute("clientReadyCallback", clientReady);
// Check whether the client is supported on the browser
arcotClient.write("ArcotIDClient");
}
2. To download or import the ArcotID using the client to the desired location (memory, hard disk, or USB)
var ret = arcotClient.ImportArcotID(document.mainform.arcotID.value, downloadType,arcotIDUserName);
Reference file: <sample application>/flow/ArWFDownloadArcotID.jsp
3. To authenticate using the ArcotID client to the desired location (memory, hard disk, or USB)
document.mainform.signedChallenge.value =
arcotClient.SignChallengeEx2(GetArcotIDChallenge(), pwd, user,
document.mainform.appcontext.value, org);
Reference file: <sample application>/flow/ArWFArcotIDAuthenticate.jsp
More details about ArcotID Client is explained in Invoking ArcotID PKI Client on Web Page