Last modified: 2014-10-21 14:02:44 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T73638, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 71638 - API description of login action is misleading
API description of login action is misleading
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
API (Other open bugs)
unspecified
All All
: Low trivial (vote)
: ---
Assigned To: Nobody - You can work on this!
: easy
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-10-04 05:49 UTC by spage
Modified: 2014-10-21 14:02 UTC (History)
4 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description spage 2014-10-04 05:49:46 UTC
The help for action=login says
"Log in and get the authentication tokens. In the event of a successful log-in, a cookie will be attached to your session. ..."

In fact, the first API result contains ONE token, and then if you provide this token and login is successful, you get a sessionid back in the API response, and the HTTP response header sets three cookies:
  <cookieprefix>UserID
  <cookieprefix>UserName
  <cookieprefix>Token, set to the sessionid in the API result

these all expire in a month, none is a session cookie.

A better description for includes/api/ApiLogin.php might be

  Log in and get sessionid and browser cookies.
  A successful login returns a session ID and its HTTP response header sets wiki cookies identifying the user.
  ...

Even this might vary with wiki configuration.
Comment 1 Brad Jorsch 2014-10-06 15:17:51 UTC
It's not like the client can reliably do anything useful with the returned session ID, since $wgSessionName isn't indicated and CentralAuth changes things too. It's probably better to just say that the needed cookies are returned in the HTTP response and leave details for https://www.mediawiki.org/wiki/API:Login.
Comment 2 Gerrit Notification Bot 2014-10-06 15:19:44 UTC
Change 162960 had a related patch set uploaded by Anomie:
API: Internationalize all remaining core API modules

https://gerrit.wikimedia.org/r/162960
Comment 3 Gerrit Notification Bot 2014-10-20 21:41:22 UTC
Change 162960 merged by jenkins-bot:
API: Internationalize all remaining core API modules

https://gerrit.wikimedia.org/r/162960

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links