Bug 474562 - Gpodder sync does not work with gpodder2go server
Summary: Gpodder sync does not work with gpodder2go server
Status: CONFIRMED
Alias: None
Product: kasts
Classification: Applications
Component: general (show other bugs)
Version: 23.08.1
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: bart
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-09-15 17:28 UTC by Tom
Modified: 2023-09-27 16:36 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tom 2023-09-15 17:28:44 UTC
SUMMARY
There seems to be a small inconsistency between the implemented gpodder specification and the specification as specified in https://gpoddernet.readthedocs.io/en/latest/api/index.html .When I try to use a gpodder server implementation that uses the official specification I run into problems because the authentification seems to be handled differently. As a server implementation I used gpodder2go and successfully synced it with the Antennapod android app (so the server implementation seems to work). This specification problem is also mentioned on the gpodder2go readme page https://github.com/oxtyped/gpodder2go#limitations/

TECHNICAL INFO
When I press the login button on Kasts it sends a request to "http://someserver/api/2/devices/username.json" and uses basic http authentification.
The gpodder v2 api specification seems to describe a different authentification flow where first a request is made to "http://someserver/api/2/auth/username/login.json" which then sets a auth cookie which is then used for further requests from the client.

STEPS TO REPRODUCE
1. Setup a gpodder2go server and create a user
2. Try to login to the server from kasts

OBSERVED RESULT
Kasts displays error message "Could not log into GPodder server  ; Error Code: 302 ; Error transferring http://someserver/api/2/devices/username.json"

EXPECTED RESULT
Successfull login and sync with the gpodder server.

SOFTWARE/OS VERSIONS
KDE Plasma Version: 5.27.8
KDE Frameworks Version: 5.110.0
Qt Version: 5.15.10
Comment 1 bart 2023-09-25 11:18:53 UTC
I confirm that Kasts only does basic password authentication right now.
I didn't know that gpodder2go existed until just now. :-)

You pointed out the gpodder API docs, but unfortunately that documentation seems unmaintained and the actual gpodder.net service seems to be deviating from the docs for certain API calls.  So I took the pragmatic approach of reverse engineering what the service actually does, rather than what the docs say it should do.

Anyway, the current sync code would need an overhaul to add an additional authentication method.  But I guess that this will be needed at some point anyway for the upcoming openpodcast API sync protocol.

Is there any open, public gpodder2go host that I could use for testing?
Comment 2 Tom 2023-09-27 16:36:17 UTC
(In reply to bart from comment #1)
> I confirm that Kasts only does basic password authentication right now.
> I didn't know that gpodder2go existed until just now. :-)
> 
> You pointed out the gpodder API docs, but unfortunately that documentation
> seems unmaintained and the actual gpodder.net service seems to be deviating
> from the docs for certain API calls.  So I took the pragmatic approach of
> reverse engineering what the service actually does, rather than what the
> docs say it should do.
> 
> Anyway, the current sync code would need an overhaul to add an additional
> authentication method.  But I guess that this will be needed at some point
> anyway for the upcoming openpodcast API sync protocol.
> 
> Is there any open, public gpodder2go host that I could use for testing?

Interesting how the gpodder.net service deviates from their own specifications.
There aren't any public gpodder2go instances that I know of but you can very quickly setup your own gpodder2go instance. Here is a very small guide https://gist.github.com/Codedotexe/8c575054588287b8c36ee409556c63bb I wrote based on my current docker setup. Alternatively I could email you access to my personal instance if you want.