https://bugzilla.wikimedia.org/show_bug.cgi?id=41956

--- Comment #2 from Brad Jorsch <[email protected]> ---
Since Gerrit change 153110, things have gotten much simpler. Now most API
modules will just implement ApiBase::needsToken

  public function needsToken() {
      return 'csrf';
  }

Using custom salts is discouraged, but if necessary is accomplished using the
'ApiQueryTokensRegisterTypes' hook:

  $wgHooks['ApiQueryTokensRegisterTypes'][] = function ( &$salts ) {
      $salts['mytokentype'] = 'salt';
      return true;
  };

(then needsToken() would return 'mytokentype' instead of 'csrf')

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to