-
Notifications
You must be signed in to change notification settings - Fork 58
Test Frontend API
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
- Name
- Hash of the passphrase
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.
GET <FrontBaseURL>/api/v1/licenses/<license_id>
Return:
- 200 + {license} (json): ok
- 404 (not found) This license does not exist in the database (type http://readium.org/license-status-document/error/notfound)
- 5xx: internal error (type http://readium.org/license-status-document/error/server)
This method calls the License Server with a request for an existing license.
GET <FrontBaseURL>/api/v1/licenses/<license_id>/publication
Return:
- 200 + licensed publication (EPUB): ok
- 404 (not found) This license does not exist in the database (type http://readium.org/license-status-document/error/notfound)
- 5xx: internal error (type http://readium.org/license-status-document/error/server)
This method calls the License Server with a request for an existing licensed publication.