Add "bot passwords"
authorBrad Jorsch <bjorsch@wikimedia.org>
Thu, 10 Dec 2015 16:09:24 +0000 (11:09 -0500)
committerGergő Tisza <gtisza@wikimedia.org>
Tue, 12 Jan 2016 22:37:44 +0000 (22:37 +0000)
commitf9fd9516d922d36291037baca7205a2b0ac9f15f
tree221aec22d7c64f37c5cac36c46767f7995b1dfc9
parentef5bd7347b0bc8c6e23cdce3eab7b9041bad5e26
Add "bot passwords"

Bot passwords are something like OAuth-lite, or Google's application
passwords: the bot can use API action=login to log in with the special
username and password, and will then be allowed to use the API with a
restricted set of rights.

This is intended to provide an easy migration path for legacy bots and
for bots on wikis without OAuth, since AuthManager is going to greatly
complicate non-interactive authentication. If OAuth is available, an
owner-only consumer would be a better choice.

Bug: T121113
Change-Id: Iaa4015e00edbfbfaedcc8b2d27a2d3fd25009159
Depends-On: I7e15331efb162275c4116bcae61f19d6b884cbe3
23 files changed:
RELEASE-NOTES-1.27
autoload.php
includes/DefaultSettings.php
includes/api/ApiLogin.php
includes/installer/MysqlUpdater.php
includes/installer/PostgresUpdater.php
includes/installer/SqliteUpdater.php
includes/session/BotPasswordSessionProvider.php [new file with mode: 0644]
includes/specialpage/SpecialPageFactory.php
includes/specials/SpecialBotPasswords.php [new file with mode: 0644]
includes/user/BotPassword.php [new file with mode: 0644]
includes/user/CentralIdLookup.php
includes/user/User.php
languages/i18n/en.json
languages/i18n/qqq.json
languages/messages/MessagesEn.php
maintenance/archives/patch-bot_passwords.sql [new file with mode: 0644]
maintenance/postgres/archives/patch-bot_passwords.sql [new file with mode: 0644]
maintenance/postgres/tables.sql
maintenance/tables.sql
tests/phpunit/includes/api/ApiLoginTest.php
tests/phpunit/includes/session/BotPasswordSessionProviderTest.php [new file with mode: 0644]
tests/phpunit/includes/user/BotPasswordTest.php [new file with mode: 0644]