Open kwisatz opened 2 years ago
I understood from reading the code that I can just paste any made-up callback URL given that all that we're interested in are the query arguments.
However, doing that, I got a TypeError: must be str or None, not bytes
due to the use of split(b'?')
.
In my case, the question mark is not encoded and I had to remove the b
prefix to make it work. Not sure in which case the pasted URL would be considered bytes
instead of a string?
I stumbled upon https://www.mediawiki.org/wiki/Extension_talk:OAuthAuthentication#OAuth_%22callback%22_URL_for_OAuthAuthentication_applications just now. I haven't tried it yet though. Is that what would be recommended for WDI too?
I understood from reading the code that I can just paste any made-up callback URL given that all that we're interested in are the query arguments. However, doing that, I got a
TypeError: must be str or None, not bytes
due to the use ofsplit(b'?')
. In my case, the question mark is not encoded and I had to remove theb
prefix to make it work. Not sure in which case the pasted URL would be consideredbytes
instead of a string?
This is still valid, and may be more pressing that the rest of this ticket.
Thank you for your pull request. I am restructuring the repo a bit to get a better grip on the library. Unfortunately, I am not an expert on OAUTH. Since raising the issue have you gained a better understanding? If so can I ask for another pull request?
From the
README
's section on OAuth1:Two things are unclear at this point when trying to use this authentication mechanism within a script/bot:
OAuth "callback" URL
?Callback URL:
), which value should be insertedconsidering that a script does not have a webserver to call back to.
I also checked https://www.mediawiki.org/wiki/OAuth/For_Developers#OAuth_1.0a which didn't help all too much in finding answers to those questions.