API: Fixes for AuthManager
authorBrad Jorsch <bjorsch@wikimedia.org>
Tue, 24 May 2016 18:05:52 +0000 (14:05 -0400)
committerBrad Jorsch <bjorsch@wikimedia.org>
Mon, 30 May 2016 12:25:19 +0000 (08:25 -0400)
commite10f96cff1968df001b068efd3147dd53f41d3bc
tree77dd50b62a90ecb4c1429f8bc90523c1249cd894
parent5cbada9dea3f22e7bb33250197b156e8628b8e4a
API: Fixes for AuthManager

* Set API response metadata on the AuthenticationRequest metadata so it
  is output as an assoc generally.
* Remove the 'image' field in AuthenticationRequest::getFieldInfo()'s
  response, since we ended up not using it anywhere.
* Make it so meta=authmanagerinfo can be used on private wikis without
  logging in, so action=clientlogin can be used to log in.
** This generalizes the exception for meta=tokens that was added in
   I83dafb030.
* ApiAuthManagerInfo needs the "messageformat" parameter.
* ApiAuthManagerInfo shouldn't be publically cached, since the responses
  vary depending on session state.

Change-Id: Iea5ddb4ef9febed18f16a7ae8314968026f39148
includes/api/ApiAuthManagerHelper.php
includes/api/ApiQuery.php
includes/api/ApiQueryAuthManagerInfo.php
includes/auth/AuthenticationRequest.php