Merge "API: Remove deprecated response values from action=login"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Tue, 11 Oct 2016 16:27:54 +0000 (16:27 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Tue, 11 Oct 2016 16:27:54 +0000 (16:27 +0000)
includes/api/ApiLogin.php
tests/phpunit/includes/api/ApiLoginTest.php

index 55edd99..6ac261d 100644 (file)
@@ -190,15 +190,6 @@ class ApiLogin extends ApiBase {
 
                                $result['lguserid'] = intval( $user->getId() );
                                $result['lgusername'] = $user->getName();
-
-                               // @todo: These are deprecated, and should be removed at some
-                               // point (1.28 at the earliest, and see T121527). They were ok
-                               // when the core cookie-based login was the only thing, but
-                               // CentralAuth broke that a while back and
-                               // SessionManager/AuthManager *really* break it.
-                               $result['lgtoken'] = $user->getToken();
-                               $result['cookieprefix'] = $this->getConfig()->get( 'CookiePrefix' );
-                               $result['sessionid'] = $session->getId();
                                break;
 
                        case 'NeedToken':
@@ -206,10 +197,6 @@ class ApiLogin extends ApiBase {
                                $this->setWarning( 'Fetching a token via action=login is deprecated. ' .
                                   'Use action=query&meta=tokens&type=login instead.' );
                                $this->logFeatureUsage( 'action=login&!lgtoken' );
-
-                               // @todo: See above about deprecation
-                               $result['cookieprefix'] = $this->getConfig()->get( 'CookiePrefix' );
-                               $result['sessionid'] = $session->getId();
                                break;
 
                        case 'WrongToken':
index 97681eb..ea8c9ca 100644 (file)
@@ -188,7 +188,6 @@ class ApiLoginTest extends ApiTestCase {
                $this->assertArrayHasKey( "login", $data[0] );
                $this->assertArrayHasKey( "result", $data[0]['login'] );
                $this->assertEquals( "Success", $data[0]['login']['result'] );
-               $this->assertArrayHasKey( 'lgtoken', $data[0]['login'] );
        }
 
        public function testBotPassword() {