New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update authentication documentation page #322
Comments
I've created a PR (#324) trying to clarify this a bit. Honestly, looking at the relevant code, the current implementation is unnecessarily complex and confusing in my opinion. We have the Dropping the OAuth1 parameters would simplify the constructor and eliminate unexpected behavior when a user passes those parameters in addition to import mwclient
import requests_oauthlib
# Current
client = mwclient.Site(
'en.wikipedia.org',
consumer_token='foo',
consumer_secret='bar',
access_token='baz',
access_secret='qux'
)
# Suggested
auth = requests_oauthlib.OAuth1('foo', 'bar', 'baz', 'qux')
client = mwclient.Site('en.wikipedia.org', httpauth=auth) This would still leave some potential confusion around the difference between Footnotes |
#332 is a follow-up to document |
edit: nope, I was wrong, I think marc's right... |
The info on authenticating in the docs doesn't cover
clientlogin()
, and - as suggested in #315 - could make it clearer that the options that allow HTTP authentication aren't alternatives for logging into mediawiki itself.The text was updated successfully, but these errors were encountered: