Dian schreef:
Hi all,
I am trying to create a new layer for the MW API which allows access
over SOAP. I plan to support some often used functions like:
*login / logout
*create / delete a page
*read / update a page
*move a page
For each function I create a query and execute it using the created
ApiMain object.
When requesting an action the user should send the cookies (and the
different tokens). In order to execute the action with proper user
credentials set, I need to set the right cookies.
Which is the best way to set the cookies in the wiki when communicating
directly over ApiMain?
You don't need to. When called in internal mode (i.e.
with ApiMain and
FauxRequest) the API will automatically use the user credentials of the
caller. If your clients pass their login cookies to your extension,
MediaWiki's startup code will do all the required magic.
Roan Kattouw (Catrope)