MediaWiki
REL1_24
|
Unit to authenticate log-in attempts to the current wiki. More...
Public Member Functions | |
__construct (ApiMain $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. | |
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 | ( | ApiMain $ | 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, LoginForm\ABORTED, array(), LoginForm\CREATE_BLOCKED, ApiBase\dieDebug(), LoginForm\EMPTY_PASS, ApiBase\extractRequestParams(), ContextSource\getConfig(), ContextSource\getContext(), ApiBase\getMain(), ContextSource\getRequest(), ApiBase\getResult(), IContextSource\getUser(), 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 178 of file ApiLogin.php.
References array().
Returns the description string for this module.
Reimplemented from ApiBase.
Definition at line 196 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 206 of file ApiLogin.php.
References array().
Reimplemented from ApiBase.
Definition at line 212 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 187 of file ApiLogin.php.
References array().
Indicates whether this module requires read rights.
Reimplemented from ApiBase.
Definition at line 174 of file ApiLogin.php.
Indicates whether this module must be called with a POST request.
Reimplemented from ApiBase.
Definition at line 170 of file ApiLogin.php.