readium / readium-js-viewer

👁 ReadiumJS viewer: default web app for Readium.js library
BSD 3-Clause "New" or "Revised" License
550 stars 186 forks source link

Implement Authintication and disable individual upload #687

Open nasirkhan opened 6 years ago

nasirkhan commented 6 years ago

I followed the steps mentioned in the Readme file and successfully installed the cloud reader. Now i need to have some specific features which are not mentioned in the doc. In summary i want to build a library with a number of books and any one can register and read the books free of cost here. But without registration the books will not be accessible.

  1. I need to apply authentication because i want to open the library for the registered users only. Anyone having the link can not read the book unless s/he creates an account. How can i enable this feature in the cloud reader?

  2. I also want to disable the book upload option for the reader users. but admin users can upload books.

danielweck commented 6 years ago

The Readium cloud / web reader is a client-side app that runs entirely in the browser. There is no server-side code at all. EPUB files are stored on the server side (static hosting), and they are simply referenced via URLs by the client code.

You can of course implement your own "backend" to host the publications and expose their resources via a system of HTTP API / routes, authentication middleware, etc. Perhaps you should consider using the "lite" version of the cloud reader which does not include the library view (only the reader view). This way, you could focus on implementing a proper content server / backend, and content manager / UI frontend (for example, an OPDS feed explorer), and use the Readium cloud reader just for the "book reading" part.

nasirkhan commented 6 years ago

@danielweck Thanks for your response.

Do you have any example project where the backend is implemented separately? It would be a great to learn from other projects.

danielweck commented 6 years ago

No I do not, sorry.

coler-j commented 5 years ago

@danielweck can you close this? It is polluting the issue list. It is resolved / inactive.