MediaWiki:Api-help-authmanager-general-usage

来自微风的维基
跳转至: 导航搜索

使用此模块的一般程序是:

  1. 通过amirequestsfor=$4取得来自action=query&meta=authmanagerinfo的可用字段,和来自action=query&meta=tokens$5令牌。
  2. 向用户显示字段,并获得其提交内容。
  3. 发送至此模块,提供$1returnurl及任何相关字段。
  4. 在响应中检查status
    • 如果您收到了PASSFAIL,您已经完成。操作要么成功,要么不成功。
    • 如果您收到了UI,present the new fields to the user and obtain their submission. Then post to this module with $1continue and the relevant fields set, and repeat step 4.
    • 如果您收到了REDIRECT,direct the user to the redirecttarget and wait for the return to $1returnurl. Then post to this module with $1continue and any fields passed to the return URL, and repeat step 4.
    • 如果您收到了RESTART,that means the authentication worked but we don't have a linked user account. You might treat this as UI or as FAIL.