Anomie has uploaded a new change for review.
https://gerrit.wikimedia.org/r/288092
Change subject: Implement invalidateSessionsForUser()
......................................................................
Implement invalidateSessionsForUser()
Change-Id: Id89a1c06ba85dba245e675862831434fbb953023
---
M includes/session/CentralAuthSessionProvider.php
M includes/session/CentralAuthTokenSessionProvider.php
2 files changed, 14 insertions(+), 0 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CentralAuth
refs/changes/92/288092/1
diff --git a/includes/session/CentralAuthSessionProvider.php
b/includes/session/CentralAuthSessionProvider.php
index 6d706fd..32756ab 100644
--- a/includes/session/CentralAuthSessionProvider.php
+++ b/includes/session/CentralAuthSessionProvider.php
@@ -377,6 +377,13 @@
array( 'prefix' => '' ) + $this->centralCookieOptions );
}
+ public function invalidateSessionsForUser( User $user ) {
+ $centralUser = CentralAuthUser::getMasterInstance( $user );
+ if ( $centralUser->exists() ) {
+ $centralUser->resetAuthToken();
+ }
+ }
+
public function preventSessionsForUser( $username ) {
$username = User::getCanonicalName( $username, 'valid' );
if ( !$username ) {
diff --git a/includes/session/CentralAuthTokenSessionProvider.php
b/includes/session/CentralAuthTokenSessionProvider.php
index d3da64e..48a4f01 100644
--- a/includes/session/CentralAuthTokenSessionProvider.php
+++ b/includes/session/CentralAuthTokenSessionProvider.php
@@ -148,6 +148,13 @@
// Nothing to do
}
+ public function invalidateSessionsForUser( User $user ) {
+ $centralUser = CentralAuthUser::getMasterInstance( $user );
+ if ( $centralUser->exists() ) {
+ $centralUser->resetAuthToken();
+ }
+ }
+
public function preventSessionsForUser( $username ) {
$username = User::getCanonicalName( $username, 'valid' );
if ( !$username ) {
--
To view, visit https://gerrit.wikimedia.org/r/288092
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Id89a1c06ba85dba245e675862831434fbb953023
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CentralAuth
Gerrit-Branch: master
Gerrit-Owner: Anomie <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits