01-20-2019, 03:57 AM | #1 | |
hopeless n00b
Posts: 5,110
Karma: 19597086
Join Date: Jan 2009
Location: in the middle of nowhere
Device: PW4, PW3, Libra H2O, iPad 10.5, iPad 11, iPad 12.9
|
Cannot open Calibre OPDS server if login is required
I just installed KOReader on a PW3 and PW4:
koreader-kindlepw2-arm-kindlepw2-linux-gnueabi-v2019.01.1-21-g6ec3143_2019-01-18.zip I'm trying to access the Calibre OPDS content server on my LAN. I get the following error message if I have a username/password set. Quote:
When I disabled Require username and password to access the content server in Calibre settings, the Calibre OPDS feed started working in KOReader. However, I access the content server using other devices and I need to enable this setting in order to be able to edit metadata via my tablet's web browser. Help, please? Thanks! |
|
01-20-2019, 06:38 AM | #2 |
Wizard
Posts: 1,675
Karma: 730583
Join Date: Oct 2014
Location: Antwerp
Device: Kobo Aura H2O
|
Authentication seems to have been implemented in https://github.com/koreader/koreader/pull/1637
400 means bad request. Authentication required would be indicated by the server with 401. You could try adding a section to your settings file with something like the following. Careful, create a backup first! Code:
authentications["hostname-or-ip"] = { username = "enter-username-here", password = "enter-password-here", } |
Advert | |
|
01-20-2019, 12:54 PM | #3 |
hopeless n00b
Posts: 5,110
Karma: 19597086
Join Date: Jan 2009
Location: in the middle of nowhere
Device: PW4, PW3, Libra H2O, iPad 10.5, iPad 11, iPad 12.9
|
I think this is the latest code change for OPDS authentication:
https://github.com/koreader/koreader/pull/4248 Again, it's only KOReader where the password-protected Calibre content server didn't work. Login to Calibre content server works fine in all the following scenarios:
Below is an excerpt from my settings.reader.lua file. The password is just stored as plain text. Code:
["opds_servers"] = { [1] = { ["title"] = "Project Gutenberg", ["url"] = "http://m.gutenberg.org/ebooks.opds/?format=opds" }, [2] = { ["title"] = "Feedbooks", ["url"] = "http://www.feedbooks.com/publicdomain/catalog.atom" }, [3] = { ["title"] = "ManyBooks", ["url"] = "http://manybooks.net/opds/index.php" }, [4] = { ["title"] = "Internet Archive", ["url"] = "https://bookserver.archive.org/" }, [5] = { ["title"] = "Calibre", ["url"] = "http://192.168.1.100:8080/opds", ["username"] = "myusername", ["password"] = "mypassword" } }, ["download_dir"] = "/mnt/us/epub/_downloads", ["calibre_opds"] = { ["host"] = "192.168.1.100", ["username"] = "myusername", ["password"] = "mypassword", ["port"] = "8080" }, |
01-21-2019, 11:12 AM | #4 | |
Wizard
Posts: 1,675
Karma: 730583
Join Date: Oct 2014
Location: Antwerp
Device: Kobo Aura H2O
|
Quote:
Code:
curl --user bla:bla -I http://192.168.1.190:8090/opds/navcatalog/4e7075626c6973686572?library_id=Calibre_Library HTTP/1.1 400 Bad Request Content-Length: 33 Content-Type: text/plain; charset=UTF-8 Date: Mon, 21 Jan 2019 14:19:29 GMT Code:
curl --digest --user bla:bla So the issue is that digest authentication is either not supported or not implemented. Unfortunately it looks like it's not supported, see here. As a workaround you can set the calibre server authentication type to basic under advanced "sharing over the net" settings, which should be fine if you're just using it on your LAN. (And also fine if you're using it encrypted with TLS.) It's not as simple as just adding an md5 hash. There's also a special dual requests protocol. It's not all bad news though: a quick search shows https://github.com/catwell/lua-http-digest which might make for a reasonably swift implementation if someone's willing to put in the leg work. |
|
01-23-2019, 02:48 AM | #5 | |
hopeless n00b
Posts: 5,110
Karma: 19597086
Join Date: Jan 2009
Location: in the middle of nowhere
Device: PW4, PW3, Libra H2O, iPad 10.5, iPad 11, iPad 12.9
|
Quote:
Thanks for the Calibre tip, too. Didn't see that option. I actually checked the advanced server settings prior to posting but I guess I got cross eyed and missed it. Switched the server to basic and Calibre OPDS login works on KOReader now. |
|
Advert | |
|
01-23-2019, 03:43 AM | #6 |
hopeless n00b
Posts: 5,110
Karma: 19597086
Join Date: Jan 2009
Location: in the middle of nowhere
Device: PW4, PW3, Libra H2O, iPad 10.5, iPad 11, iPad 12.9
|
P.S.
Gotta say though, now that I've figured out how to add my Dropbox account to KOReader, the OPDS probably won't get used much. On the plus side, I'm getting more use out of my Kindle now. Transferring EPUB files to the Kindle via Dropbox is super easy and all I need is my smartphone. No need to go through desktop+Calibre to convert to MOBI/KF8. I can just read the EPUB immediately. KOReader Rocks! |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
COPS : Calibre OPDS PHP Server | vlad59 | Related Tools | 1920 | 11-03-2024 02:52 PM |
Calibre OPDS server with windows apps? | nickdma | Related Tools | 10 | 03-03-2024 03:53 PM |
BicBucStriim 1.0, HTML and OPDS server for Calibre libraries | textmulch | Related Tools | 7 | 04-20-2013 11:46 PM |
BicBucStriim 0.9, HTML and OPDS server for Calibre libraries | textmulch | Related Tools | 13 | 11-16-2012 06:10 AM |
calibre-server OPDS catalog - manual move to web server | HaakonME | Related Tools | 5 | 09-21-2012 04:11 AM |