steinarb / opds-reader

A calibre plugin containing an OPDS client that can import books into calibre
GNU General Public License v3.0
49 stars 25 forks source link

Can't seem to authenticate #30

Open ArtyomFR opened 3 years ago

ArtyomFR commented 3 years ago

Hi, I wan't use this plugin with a calibre-web generated opds. My server is private and authentification must be use. Does this plugin support basic authentification from calibre-web? Thanks for your help!

steinarb commented 3 years ago

Hi,

This is no such functionality right now.

Also, since this isn't something that I need, it is unfortunately not likely to be implmenented by me. :-)

But I agree this would be a reasonable thing to have, and I will take and merge reasonable PRs.

A reasonable PR would be to pop up a dialog prompting for credentials when receiving a 401 HTTP code on loading a feed or downloading a book.

It probably be best not to persist the credentials (unless calibre already has a mechanism for this...? I've no idea if it does).

Note also that urllib and feedparser may allow the workaround listed at the start of this page (adding username and password to the URL). https://pythonhosted.org/feedparser/http-authentication.html#downloading-a-feed-protected-by-basic-authentication-the-easy-way

OdinVex commented 2 years ago

Feedback, adding auth details to uri does not work, unfortunately. A mechanism to check for HTTP 401 should be added.

steinarb commented 1 year ago

Yes, but not something I need, so not something I will spend time on.