미디어위키 API 도움말

이 페이지는 자동으로 생성된 미디어위키 API 도움말 문서입니다.

설명 문서 및 예시: https://www.mediawiki.org/wiki/API

action=clientlogin (login)

(main | clientlogin)
  • 이 모듈은 POST 요청만을 허용합니다.
  • 출처: MediaWiki
  • 라이선스: GPL-2.0+

상호작용 플로우를 이용하여 위키에 로그인합니다.

The general procedure to use this module is:

  1. Fetch the fields available from action=query&meta=authmanagerinfo with amirequestsfor=login, and a login token from action=query&meta=tokens.
  2. Present the fields to the user, and obtain their submission.
  3. Post to this module, supplying loginreturnurl and any relevant fields.
  4. Check the status in the response.
    • If you received PASS or FAIL, you're done. The operation either succeeded or it didn't.
    • If you received UI, present the new fields to the user and obtain their submission. Then post to this module with logincontinue 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 loginreturnurl. Then post to this module with logincontinue 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 a linked user account. You might treat this as UI or as FAIL.
변수:
loginrequests

Only use these authentication requests, by the id returned from action=query&meta=authmanagerinfo with amirequestsfor=login or from a previous response from this module.

Separate values with | or alternative. 값들의 최대 수는 50입니다. (봇의 경우 500)
loginmessageformat

반환 메시지에 사용할 형식.

다음 값 중 하나: html, wikitext, raw, none
기본값: wikitext
loginmergerequestfields

Merge field information for all authentication requests into one array.

유형: 부울 (자세한 정보)
loginpreservestate

Preserve state from a previous failed login attempt, if possible.

유형: 부울 (자세한 정보)
loginreturnurl

Return URL for third-party authentication flows, must be absolute. Either this or logincontinue is required.

Upon receiving a REDIRECT response, you will typically open a browser or web view to the specified redirecttarget URL for a third-party authentication flow. When that completes, the third party will send the browser or web view to this URL. You should extract any query or POST parameters from the URL and pass them as a logincontinue request to this API module.

logincontinue

This request is a continuation after an earlier UI or REDIRECT response. Either this or loginreturnurl is required.

유형: 부울 (자세한 정보)
logintoken

A "login" token retrieved from action=query&meta=tokens

이 변수는 필수 입력 사항입니다.
*
This module accepts additional parameters depending on the available authentication requests. Use action=query&meta=authmanagerinfo with amirequestsfor=login (or a previous response from this module, if applicable) to determine the requests available and the fields that they use.
예시:
사용자 Example, 비밀번호 ExamplePassword로 위키 로그인 과정을 시작합니다.
api.php?action=clientlogin&username=Example&password=ExamplePassword&loginreturnurl=http://example.org/&logintoken=123ABC [연습장에서 열기]
Continue logging in after a UI response for two-factor auth, supplying an OATHToken of 987654.
api.php?action=clientlogin&logincontinue=1&OATHToken=987654&logintoken=123ABC [연습장에서 열기]