Talkilla/SPA API: Difference between revisions

no edit summary
No edit summary
Line 19: Line 19:


It is advisable to make the Javascript web worker as lightweight as possible, as this will be continuously running in the background of the browser.
It is advisable to make the Javascript web worker as lightweight as possible, as this will be continuously running in the background of the browser.
==SPA Code Configuration==
An SPA's code should be in one directory, under <code>static/spa/<spa name></code>. The directory structure may be whatever is appropriate. Other Talkilla files may be used, but we do not currently specify an API for these.
Configuration of the SPA is by a single file, <code>static/spa/<spa name>/config.json</code>. The file should contain:
{
  loginURL: "/url/to/login/page.html"
}
The <code>loginURL</code> should point to the URL of the iframe to load for logging into the service provider. Typically this is expected to be hosted on a provider's own site.
As detailed elsewhere, the url of the worker to use for the SPA is detailed in the 'talkilla.spa-enable' message received from the login page and all other SPA loading/controls will come from the worker.


==SPA Installation==
==SPA Installation==
canmove, Confirmed users, Bureaucrats and Sysops emeriti
3,628

edits