MediaWiki
REL1_22
|
Unit to authenticate log-in attempts to the current wiki. More...
Public Member Functions | |
__construct ($main, $action) | |
execute () | |
Executes the log-in attempt using the parameters passed. | |
getAllowedParams () | |
Returns an array of allowed parameters (parameter name) => (default value) or (parameter name) => (array with PARAM_* constants as keys) Don't call this function directly: use getFinalParams() to allow hooks to modify parameters as needed. | |
getDescription () | |
Returns the description string for this module. | |
getExamples () | |
Returns usage examples for this module. | |
getHelpUrls () | |
getParamDescription () | |
Returns an array of parameter descriptions. | |
getPossibleErrors () | |
Returns a list of all possible errors returned by the module. | |
getResultProperties () | |
Returns possible properties in the result, grouped by the value of the prop parameter that shows them. | |
isReadMode () | |
Indicates whether this module requires read rights. | |
mustBePosted () | |
Indicates whether this module must be called with a POST request. |
Unit to authenticate log-in attempts to the current wiki.
Definition at line 33 of file ApiLogin.php.
ApiLogin::__construct | ( | $ | main, |
$ | action | ||
) |
Definition at line 35 of file ApiLogin.php.
Executes the log-in attempt using the parameters passed.
If the log-in succeeds, it attaches a cookie to the session and outputs the user id, username, and session token. If a log-in fails, as the result of a bad password, a nonexistent user, or any other reason, the host is cached with an expiry and no log-in attempts will be accepted until that expiry is reached. The expiry is $this->mLoginThrottle.
Reimplemented from ApiBase.
Definition at line 48 of file ApiLogin.php.
References ContextSource\$context, $params, $result, $user, $wgCookiePrefix, LoginForm\ABORTED, array(), LoginForm\CREATE_BLOCKED, ApiBase\dieDebug(), LoginForm\EMPTY_PASS, ApiBase\extractRequestParams(), ContextSource\getContext(), ApiBase\getMain(), ContextSource\getRequest(), ApiBase\getResult(), IContextSource\getUser(), global, LoginForm\ILLEGAL, LoginForm\NEED_TOKEN, LoginForm\NO_NAME, LoginForm\NOT_EXISTS, LoginForm\RESET_PASS, ApiQueryInfo\resetTokenCache(), LoginForm\SUCCESS, LoginForm\THROTTLED, LoginForm\USER_BLOCKED, wfRunHooks(), wfSetupSession(), LoginForm\WRONG_PASS, LoginForm\WRONG_PLUGIN_PASS, and LoginForm\WRONG_TOKEN.
Returns an array of allowed parameters (parameter name) => (default value) or (parameter name) => (array with PARAM_* constants as keys) Don't call this function directly: use getFinalParams() to allow hooks to modify parameters as needed.
Some derived classes may choose to handle an integer $flags parameter in the overriding methods. Callers of this method can pass zero or more OR-ed flags like GET_VALUES_FOR_HELP.
Reimplemented from ApiBase.
Definition at line 177 of file ApiLogin.php.
References array().
Returns the description string for this module.
Reimplemented from ApiBase.
Definition at line 255 of file ApiLogin.php.
References array().
Returns usage examples for this module.
Return false if no examples are available.
Reimplemented from ApiBase.
Definition at line 281 of file ApiLogin.php.
References array().
Reimplemented from ApiBase.
Definition at line 287 of file ApiLogin.php.
Returns an array of parameter descriptions.
Don't call this function directly: use getFinalParamDescription() to allow hooks to modify descriptions as needed.
Reimplemented from ApiBase.
Definition at line 186 of file ApiLogin.php.
References array().
Returns a list of all possible errors returned by the module.
Don't call this function directly: use getFinalPossibleErrors() to allow hooks to modify parameters as needed.
Reimplemented from ApiBase.
Definition at line 265 of file ApiLogin.php.
References array().
Returns possible properties in the result, grouped by the value of the prop parameter that shows them.
Properties that are shown always are in a group with empty string as a key. Properties that can be shown by several values of prop are included multiple times. If some properties are part of a list and some are on the root object (see ApiQueryQueryPage), those on the root object are under the key PROP_ROOT. The array can also contain a boolean under the key PROP_LIST, indicating whether the result is a list.
Don't call this function directly: use getFinalResultProperties() to allow hooks to modify descriptions as needed.
Reimplemented from ApiBase.
Definition at line 195 of file ApiLogin.php.
References array(), ApiBase\PROP_NULLABLE, and ApiBase\PROP_TYPE.
Indicates whether this module requires read rights.
Reimplemented from ApiBase.
Definition at line 173 of file ApiLogin.php.
Indicates whether this module must be called with a POST request.
Reimplemented from ApiBase.
Definition at line 169 of file ApiLogin.php.