Page MenuHomePhabricator

Wrap-up report for "Implement support for OAuth in Pywikibot"
Closed, ResolvedPublic

Description

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:

screenshot-0.png (712×596 px, 143 KB)

Generating OAuth tokens:

Artboard.png (199×1 px, 90 KB)

Authenticate via web browser:

screenshot-1.png (776×1 px, 141 KB)

Query string in the address bar of web browser after authenticating:

screenshot-3.png (873×1 px, 193 KB)

Resource links

Event Timeline

VcamX set Security to None.

Hi @VcamX, screenshots along with description would be very welcome because a link to the demo is unavailable. Thanks.

It would be good to mention