MediaWiki:Api-help-authmanager-general-usage
From Medusa: Coordinate Free Mehless Method implementation
The general procedure to use this module is:
- Fetch the fields available from action=query&meta=authmanagerinfo with amirequestsfor=$4</kbd>, and a <kbd>$5 token from action=query&meta=tokens.
- Present the fields to the user, and obtain their submission.
- Post to this module, supplying $1returnurl</var> and any relevant fields.
# Check the <samp>status</samp> in the response.
#* If you received <samp>PASS</samp> or <samp>FAIL</samp>, you're done. The operation either succeeded or it didn't.
#* If you received <samp>UI</samp>, present the new fields to the user and obtain their submission. Then post to this module with <var>$1continue and the relevant fields set, and repeat step 4.
- If you received REDIRECT, direct the user to the redirecttarget and wait for the return to $1returnurl</var>. Then post to this module with <var>$1continue and any fields passed to the return URL, and repeat step 4.
- If you received RESTART, that means the authentication worked but we don't have an linked user account. You might treat this as UI or as FAIL.