-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Description
See https://www.mediawiki.org/wiki/API:Login
Since MediaWiki 1.27.0 the login action has been deprecated in favor of the new clientlogin action. We've already seen an inconsistency in the API result (see #25) but we need to prepare for login's eventual removal.
In Scripto_Service_MediaWiki::login() we'll need to replace the existing login requests with the clientlogin interactive flow:
$params = array('meta' => 'tokens', 'type' => 'login');
$response = $this->_request('query', $params);
$logintoken = $response['query']['tokens']['logintoken'];
$params = array(
'username' => $username,
'password' => $password,
'logintoken' => $logintoken,
'loginreturnurl' => 'http://example.com',
'rememberMe' => '1',
);
$response = $this->_request('clientlogin', $params);On top of this we'll need a way to determine when to use the login action for older installations.
Metadata
Metadata
Assignees
Labels
No labels