Skip to content

Test Frontend API

L. Le Meur edited this page Nov 15, 2019 · 8 revisions

In brief

The Test Frontend presents three interfaces:

  • A Web interface that allows a manager (who could be authentified later) to create, update and delete:
  • Publications
  • Customers
  • A Web interface that allows a customer to acquire a publication and fetch a newly generated license or a protected publication.
  • A REST API that allows a client app to fetch an (up to date) existing license

For each publication, the frontend stores:

  • Identifier
  • Title

For each customer, the frontend stores:

  • Identifier
  • Email
  • Name
  • Hash of the passphrase

Acquisition process

The Web interface allows a customer to choose a publication, select if he wants to fetch a .lcpl license or a protected publication, and acquire (simulation of loan/buy/rent) the publication; the rights - pages to print, caracters to copy, date start/end - are chosen at this level in the test frontend.

The customer receives in return the corresponding license or protected publication. If the customer’s device is a desktop computer, the license or protected publication is automatically downloaded (if the device is an iPad, another solution may have to be studied).

The user can then sideload the file to a Readium LCP compliant reading system.

API

Fetch an existing license

GET <FrontBaseURL>/api/v1/licenses/<license_id>

Return:

This method calls the License Server with a request for an existing license.

Fetch an existing licensed publication

GET <FrontBaseURL>/api/v1/licenses/<license_id>/publication

Return:

This method calls the License Server with a request for an existing licensed publication.