Our JavaScript client library SDK is currently in experimental form and available only as source.
Installation¶
You can find the latest source releases for the Javascript client library SDK in our GitHub repository.
Dependencies. In order to use the client library SDK, you’ll need to first ensure you have a working JavaScript development environment:
Web server with permissions letting you put the library and sample files where the server can locate and load them.
JavaScript implementation of the SHA family of hashes provided in the included
libsrc/sha.js
source file bundled in the SDK.
Authentication API¶
The library provides a helper API you can use to make it easier to create authenticated URLs for REST API invocations. In general, there are three kinds of REST API routes:
Those that require an authenticated calling user context (the overwhelming majority) must be decorated by tokens that indicate the application making the request and the logged-in user context for the request (i.e. the logged-in user on behalf of which the client application is acting). (Note that because of the way our authentication system works, a calling user context also implies an application context.)
Those that require only an authenticated application context must be decorated by tokens that indicate the application making the request (but not a particular person with a back-end service user account). Typically these routes include only those that can gather general property information about the LMS API itself.
The authentication entry point route that a client application must use to start the process for establishing a user context.
In the typical work-flow with this API, the client application should start by creating a new application context with its App ID and App Key. Then, the client application can use this application context to initiate user authentication for an LMS user, and then handle the results of that user authentication process to create a calling user context for that logged-in user. Finally, the client application can use the created calling user context to properly decorate API queries with the authentication tokens that signal the user context to the back-end service.
API Reference¶
The API Reference documentation for the JavaScript client library SDK is auto-generated from comments embedded in the source code.