rook added a comment.
I went back to the mediawiki library. Though still not getting too far
Sending requests with default User-Agent. Set 'user_agent' on
mwoauth.flask.MWOAuth to quiet this message.
[E 2023-05-24 15:17:20.542 JupyterHub web:1798] Uncaught exception GET
/hub/oauth_login?next=%2Fhub%2F (192.168.49.1)
HTTPServerRequest(protocol='http', host='hub.paws.local', method='GET',
uri='/hub/oauth_login?next=%2Fhub%2F', version='HTTP/1.1',
remote_ip='192.168.49.1')
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/tornado/web.py", line
1713, in _execute
result = await result
File
"/usr/local/lib/python3.9/site-packages/oauthenticator/mediawiki.py", line 48,
in get
redirect, request_token = await wrap_future(
File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line
58, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/local/lib/python3.9/site-packages/mwoauth/handshaker.py",
line 87, in initiate
return initiate(self.mw_uri, self.consumer_token,
File "/usr/local/lib/python3.9/site-packages/mwoauth/functions.py",
line 93, in initiate
request_token = process_request_token(r.text)
File "/usr/local/lib/python3.9/site-packages/mwoauth/functions.py",
line 109, in process_request_token
raise OAuthException(
mwoauth.errors.OAuthException: Expected x-www-form-urlencoded response
from MediaWiki, but got something else: '{"messageTranslations":{"en":"The
request method (POST) was not one of the allowed methods for this path (HEAD,
GET)"},"httpCode":405,"httpReason":"Method Not Allowed"}'
[E 2023-05-24 15:17:20.567 JupyterHub log:178] {
"Upgrade-Insecure-Requests": "1",
"Cookie": "host=[secret]",
"Referer": "http://hub.paws.local/hub/login?next=%2Fhub%2F",
"Accept-Encoding": "gzip, deflate",
"Accept-Language": "en-US,en;q=0.5",
"Accept":
"text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8",
"User-Agent": "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:109.0)
Gecko/20100101 Firefox/113.0",
"X-Scheme": "http",
"X-Forwarded-Scheme": "http",
"X-Forwarded-Proto": "http,http",
"X-Forwarded-Port": "80,80",
"X-Forwarded-Host": "hub.paws.local",
"X-Forwarded-For": "192.168.49.1,::ffff:172.17.0.6",
"X-Real-Ip": "192.168.49.1",
"X-Request-Id": "c230c543eeb3f3379db52fa54a198e1b",
"Host": "hub.paws.local",
"Connection": "close"
}
[E 2023-05-24 15:17:20.567 JupyterHub log:186] 500 GET
/hub/oauth_login?next=%2Fhub%2F (@192.168.49.1) 160.39ms
I'm finding information in the docs about switching the POST method in a
token request but not finding as much about the key request. Code is updated on
the PR. Any guidance?
TASK DETAIL
https://phabricator.wikimedia.org/T243200
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: rook
Cc: dcaro, bd808, rook, Aklapper, Stang, Daniel_Mietchen, Bstorm, Dvorapa,
MarcoAurelio, pywikibot-bugs-list, Mpaa, Chicocvenancio, PotsdamLamb, Devnull,
Slst2020, Jyoo1011, nskaggs, JohnsonLee01, SHEKH, Dijkstra, Raymond_Ndibe,
Khutuck, Zkhalido, AshokChakra, Viztor, 94rain, Wenyi, sietec, R96340, Tbscho,
MayS, Mdupont, JJMC89, Altostratus, Avicennasis, Susannaanas, Fuzheado,
mys_721tx, Jane023, Xqt, yuvipanda, jayvdb, zhuyifei1999, Masti, Alchimista
_______________________________________________
pywikibot-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]