Extended login: Don't use a $wg config variable, add UserName
authorMatthew Flaschen <mflaschen@wikimedia.org>
Wed, 22 Jun 2016 16:36:16 +0000 (18:36 +0200)
committerMatthew Flaschen <mflaschen@wikimedia.org>
Thu, 23 Jun 2016 17:35:17 +0000 (19:35 +0200)
commit04993acecbe27c5df6d1191d2b694d6ce450c3b7
treecd6bc638df13f5f85d8016e1942b093c2dae3028
parent495cd436a5b04943e138ed59e4ff8ccd7093f61c
Extended login: Don't use a $wg config variable, add UserName

CentralAuth needs 'User' as well for this to work.  However, this
shows the exact cookie names are an implementation detail that should
not be exposed as a 'wg'.

Instead, use a function in the CookieSessionProvider.  That way,
CentralAuth can override it properly without requiring users to change
$wg's.

I also added UserName. provideSessionInfo will fail to return
session info if UserID and UserName are both set and don't match.

Also, the UserID<->UserName mapping is public, so there is no
additional privacy issue.  Thus, it seems we should expire them
the same time.

Bug: T68699
Change-Id: Ia3259846433980408f79d44f665e17e15670e8ee
RELEASE-NOTES-1.28
includes/DefaultSettings.php
includes/session/CookieSessionProvider.php
tests/phpunit/includes/session/CookieSessionProviderTest.php