Commit graph

7 commits

Author SHA1 Message Date
Fomafix
43244db9a2 Use PHP 7 '??' operator instead of if-then-else
Change-Id: If9d4be5d88c8927f63cbb84dfc8181baf62ea3eb
2018-10-21 21:46:46 +02:00
Kunal Mehta
d9deecf432 Split AuthManagerAuthPluginUser into a separate file
Change-Id: I22d2bf9514caf717a5d949bed425de1376670d3e
2018-08-28 15:22:49 -07:00
Thiemo Mättig
c6387060d8 Fix some broken @var comments and add missing uses
Change-Id: I2091f4107b6c23d9c3b698999147ce3a2ec38b66
2018-02-08 20:00:25 +00:00
Umherirrender
c1281350fc Update signature of UserGroupsChanged to match documentation
UserGroupsChanged is called in Special:UserRights with seven args
The caller in User.php only has five

Change-Id: I221da323c79bb8da0113533d01b429249d15e7de
2017-09-19 19:31:26 +02:00
Brad Jorsch
677c66b31e AuthManager: Break AuthPlugin::addUser more explicitly
AuthPlugin::addUser() is intended to only touch the external database
without creating a local user, which isn't possible under AuthManager
without reproducing too much of AuthManager's account creation methods
(and risking breaking things in even more obscure ways) to be
worthwhile.

As it is, either this will fail because the caller already called
User::addToDatabase() or the caller's subsequent User::addToDatabase()
call will fail because we're creating the local user.

So instead, let's just throw an exception unconditionally instead of
pretending it could work.

Bug: T137843
Change-Id: I8a439ea190c752a7fc49de5617e2c64c314c38f0
2016-07-10 09:17:42 -04:00
Gergő Tisza
d850025e60 Reject authentication data change when there are warnings
AuthManager uses a status which is OK but not good for authentication
data which is discouraged but still accepted for authentication.
Users should not be allowed to change credentials into such invalid state.
This change brings the web logic and the AuthPlugin fallback in sync with
the API which already used the stricter check.

Change-Id: I4ff54fcc901f6fe11f15ed60fc1a3d8753de9f6c
2016-06-07 17:24:18 +00:00
Brad Jorsch
d245bd25ae Add AuthManager
This implements the AuthManager class and its needed interfaces and
subclasses, and integrates them into the backend portion of MediaWiki.
Integration with frontend portions of MediaWiki (e.g. ApiLogin,
Special:Login) is left for a followup.

Bug: T91699
Bug: T71589
Bug: T111299
Co-Authored-By: Gergő Tisza <gtisza@wikimedia.org>
Change-Id: If89d24838e326fe25fe867d02181eebcfbb0e196
2016-05-16 15:11:02 +00:00