mediawiki.api: Use action=query&meta=tokens instead of action=tokens
authorTimo Tijhof <krinklemail@gmail.com>
Wed, 15 Oct 2014 20:48:35 +0000 (20:48 +0000)
committerKrinkle <krinklemail@gmail.com>
Wed, 18 Nov 2015 17:58:21 +0000 (17:58 +0000)
commit298cf413dbc3fa4ee750758e7272ca401da4862c
tree1292df962868eafc4ae3fdae23877c42e8f9c260
parent42e257a1a28c3b381eb1f6002e4b6417fc85d8a4
mediawiki.api: Use action=query&meta=tokens instead of action=tokens

Follows-up aacdb664a1, which was reverted.

API action=query&meta=tokens has different token types than the old
action=tokens values. Use a map to maintain support in the JavaScript API for
old token types that now fold into the generic 'csrf'.

Aside from core token types, those added by extensions are no longer
actively used from the old token API.

Bug: T72059
Change-Id: Iec3a9f0f51d64d90c81a147cc18097dcf679c7c9
includes/resourceloader/ResourceLoaderUserTokensModule.php
resources/src/mediawiki/api.js
tests/qunit/suites/resources/mediawiki.api/mediawiki.api.options.test.js
tests/qunit/suites/resources/mediawiki.api/mediawiki.api.test.js