Information Technology

Using the API for login, password changing and new account creation

It is possible to step around the standard login option interface and create unique interfaces for particular applications.  This involves using three API calls.  Additional API calls are discussed in the section on the API.

In the following examples, it is assumed that you assigned the aLoginObject to the variable myLoginApp. Notice that the callback routines must be entered to get a response.  The callback defined in the configuration object will not be used.

Login

To allow users to login you need to add a line something like,

<a href="#" onclick="myLoginApp.login(gotLoginInfo);">Login</a>

to your page.  Clicking on the link "Login" causes the basic login interface to be displayed.

Change Password

In the body of you document add a line something like,

<a href='#' onclick="loginObject.changePassword(gotNewPassword,user,password);">Change Password</a>

to your page.  Clicking on the link "Change Password" causes the basic password update interface to be displayed. The user and password are the current values of the account be changed.

New Account

In the body of you document add the line something like,

<a href='#' onclick="loginObject.newAccount();">Create A New Account</a>

to your page.  Clicking on the link "Create A New Account" causes the basic new account interface to be displayed.

Extra Parameter

Both login and changePassword allow the application to attach another parameter to the call, i.e.,

myLoginApp.login(gotLoginInfo,otherValue);

This value is not used by aLogin but is returned to the callback routine as a second argument after the results array.