Fields required in a wrap-up report:
- Project description (as you would explain it to a layman who has no clue about MediaWiki). Please include screenshots with description - explaining how exactly the tool/extension works.
- Missing features/known bugs. Add links to phabricator tasks for the same and leave a short explanation.
- Demo server link
- Resource links (Project in gerrit/github, extension link on wiki etc.)
- Anything else you can think of, which can make contributing to this project easier for newcomers.
(Please edit this task itself to write your report. Make sure you complete it by 21st of August when end-term evaluations start.)
Project description
MediaWiki supports OAuth v1.0a as a method of authentication via OAuth extension. This project adds OAuth v1.0a support for Pywikibot, which is a collection of tools that automate work on MediaWiki sites.
Pywikibot could be used as an OAuth application for MediaWiki sites with OAuth extension installed and configured properly. Users could use Pywikibot to authenticate accounts and replace password with OAuth authentication as an alternative login method.
This project also includes switching of HTTP library from httplib2 to requests and unit tests related to OAuth authentication and its integration with Pywikibot. All integration builds of Pywikibot now test OAuth on Travis CI (Ubuntu) and Appveyor (Win32). This enables 'logged in' tests to be performed on some wiki sites, including beta wiki, which is deployed on Beta Cluster and is an environment where password's are not considered secure (effectively solving T100797: Set up Pywikibot account on beta sites to run user tests).
Missing features/known bugs
Not project strictly related:
- Nonce already used regularly occurring on beta cluster: T109173
- config.authenticate should allow configuration using family/lang: T108334
Upstream related:
- Python 2.6 using cryptography package 0.8.2: T108061
- TypeError with ndg-httpsclient on Python2.7: T105767
Demo server link
All implemented features are all merge in Pywikibot's master branch, so there's no individual demo.
The oauth test edits can be seen at https://test.wikipedia.org/w/index.php?title=User:Pywikibot-oauth/edit_test&action=history
Pywikibot login script:
Generating OAuth tokens:
Authenticate via web browser:
Query string in the address bar of web browser after authenticating:
Resource links
- Overall Plan of Pywikibot OAuth Support: T102599
- Merged patch sets on gerrit during GSoC 2015
- Pywikibot repository on GitHub
- Pywikibot OAuth manual on MediaWiki site
- OAuth authentication tokens fetching process