Appalachian provides a read-only API for other extensions. You can retrieve information about what Appalachian is storing, but you can't append or modify any of it via the API. Users should use Appalachian themselves to change any OpenID information.
[edit]
Usage Pattern
Include the XUL overlay in your own XUL at the top of the file:
<?xul-overlay href="chrome://appalachian/content/appalachian-api.xul"?>
and then add what will be a non-visible element somewhere in the body of your XUL document:
<box id="appalachian-api"/>
The requisite files will be loaded via the XUL overlay mechanism. In your JavaScript, Appalachian can be accessed with methods of the AppalachianAPI variable. Any methods below can then be called.
[edit]
Methods
- AppalachianAPI.list
-
OpenID[] appalachian.list() - Lists all the available OpenIDs.
- AppalachianAPI.exists
-
boolean appalachian.exists(String openid_url) - Checks that an OpenID exists.
- AppalachianAPI.useExists
-
boolean appalachian.useExists(String openid_url, String url) - Checks that an OpenID use exists for a consuming URL.
- AppalachianAPI.getInfo
-
OpenID appalachian.getInfo(int appalachian_id) - Returns all Appalachian info about an OpenID based on its internal Appalachian identifier as an
OpenIDobject
- AppalachianAPI.login
-
void appalachian.login(String openid_url, String target, function appLogin) - Login to the target site using the Appalachian-managed openid_url.
appLoginis a continuation function that Appalachian will call once the login cycle is either completed or aborted.
- yourApplication.appLogin
-
void yourApplication.appLogin(String openid_url, String target, function success, function failure) - Your application should provide its
appLoginfunction toappalachian.loginwith the above prototype and implementation. Your application should be able to differentiate between success and failure conditions for login and call thesuccessand failurefunctionsprovided by Appalachian accordingly.
[edit]
Supplementary Objects
[edit]
OpenID
The OpenID object, representing an OpenID. The object is only returned as a member of a JavaScript array in appalachian.list.
- openid.getID
-
int openid.getID() - Fetches the internal ID representing the OpenID in Appalachian storage.
- openid.getURL
-
String openid.getURL() - Fetches a string containing the OpenID URL.
- openid.getServer
-
String openid.getServer() - Fetches the identity provider for the URL.
- openid.getUse
-
String openid.getUse() - Fetches the use a user assigns to the OpenID.
- openid.isDefault
-
boolean openid.isDefault() - Whether the OpenID is the default for Appalachian's normal uses.

