timwaters / omniauth-mediawiki

MediaWiki OAuth strategy for Omniauth, used for all wikimedia.org wikis (e.g. commons.wikimedia.org , wikipedia.org) with the oauth extension installed
Other
4 stars 9 forks source link

Simplify mediawiki authentication #5

Closed tomhughes closed 8 years ago

tomhughes commented 8 years ago

This removes the seeming unnecessary overiding of request_phase reducing the risk of diverging from the parent class version which it was largely copied from.

It also removed the override of callback_url in favour of using the default, which requests a callback to the correct omniauth callback rather than requesting out-of-band callback which seems wrong for a web authentication framework.

This has been tested - you need to make sure you specify the right callback prefix and enable callback URLs when creating the consumer at the mediawiki end but so long as you do that it works fine.

timwaters commented 8 years ago

many thanks, will review this week

timwaters commented 8 years ago

Awesome stuff. It may have been originally added via a reading of the extension code, or early client code: https://github.com/wikimedia/mediawiki-extensions-OAuth/blob/master/backend/MWOAuthServer.php#L60

But it seems as if they have improved the extension thankfully!