CSteipp has uploaded a new change for review.
https://gerrit.wikimedia.org/r/79155
Change subject: Start a session for the OAuth user
......................................................................
Start a session for the OAuth user
After authenticating and loading an OAuth user, start a php session for
them. This enables edit tokens, captcha storage, etc.
Bug: 52428
Change-Id: Ica9cc778399cfcd71788ca691f33150df8265968
---
M api/MWOAuthAPI.setup.php
1 file changed, 3 insertions(+), 0 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/OAuth
refs/changes/55/79155/1
diff --git a/api/MWOAuthAPI.setup.php b/api/MWOAuthAPI.setup.php
index 111f27d..c9620b8 100644
--- a/api/MWOAuthAPI.setup.php
+++ b/api/MWOAuthAPI.setup.php
@@ -105,6 +105,9 @@
'accesstoken' => $accesstoken,
'rights' =>
MWOAuthUtils::getGrantRights( $access->get( 'grants' ) ),
);
+ // Setup a separate php session for this OAuth
user, so edit tokens work
+ session_name( 'oauthuser' );
+ session_start();
$result = true;
}
} catch( ErrorPageError $ex ) {
--
To view, visit https://gerrit.wikimedia.org/r/79155
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ica9cc778399cfcd71788ca691f33150df8265968
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/OAuth
Gerrit-Branch: master
Gerrit-Owner: CSteipp <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits