MediaWiki REL1_30
|
Public Member Functions | |
getAuthenticationRequests ( $action, array $options) | |
Return the applicable list of AuthenticationRequests. | |
postAuthentication ( $user, AuthenticationResponse $response) | |
Post-login callback. | |
testForAccountCreation ( $user, $creator, array $reqs) | |
Determine whether an account creation may begin. | |
testForAuthentication (array $reqs) | |
Determine whether an authentication may begin. | |
Public Member Functions inherited from MediaWiki\Auth\AbstractPreAuthenticationProvider | |
postAccountCreation ( $user, $creator, AuthenticationResponse $response) | |
Post-creation callback. | |
postAccountLink ( $user, AuthenticationResponse $response) | |
Post-link callback. | |
testForAccountLink ( $user) | |
Determine whether an account may linked to another authentication method. | |
testUserForCreation ( $user, $autocreate, array $options=[]) | |
Determine whether an account may be created. | |
Public Member Functions inherited from MediaWiki\Auth\AbstractAuthenticationProvider | |
getUniqueId () | |
@inheritDoc | |
setConfig (Config $config) | |
Set configuration. | |
setLogger (LoggerInterface $logger) | |
setManager (AuthManager $manager) | |
Set AuthManager. | |
Protected Member Functions | |
makeError ( $message, SimpleCaptcha $captcha) | |
verifyCaptcha (SimpleCaptcha $captcha, array $reqs, User $user) | |
Verify submitted captcha. | |
Additional Inherited Members | |
Protected Attributes inherited from MediaWiki\Auth\AbstractAuthenticationProvider | |
Config | $config |
LoggerInterface | $logger |
AuthManager | $manager |
Definition at line 9 of file CaptchaPreAuthenticationProvider.php.
CaptchaPreAuthenticationProvider::getAuthenticationRequests | ( | $action, | |
array | $options ) |
Return the applicable list of AuthenticationRequests.
Possible values for $action depend on whether the implementing class is also a PreAuthenticationProvider, PrimaryAuthenticationProvider, or SecondaryAuthenticationProvider.
string | $action | |
array | $options | Options are:
|
Reimplemented from MediaWiki\Auth\AbstractPreAuthenticationProvider.
Definition at line 10 of file CaptchaPreAuthenticationProvider.php.
References $options, and ConfirmEditHooks\getInstance().
|
protected |
string | $message | Message key |
SimpleCaptcha | $captcha |
Definition at line 152 of file CaptchaPreAuthenticationProvider.php.
References wfMessage().
Referenced by testForAccountCreation(), and testForAuthentication().
CaptchaPreAuthenticationProvider::postAuthentication | ( | $user, | |
AuthenticationResponse | $response ) |
Post-login callback.
This will be called at the end of a login attempt. It will not be called for unfinished login attempts that fail by the session timing out.
User | null | $user | User that was attempted to be logged in, if known. This may become a "UserValue" in the future, or User may be refactored into such. |
AuthenticationResponse | $response | Authentication response that will be returned (PASS or FAIL) |
Reimplemented from MediaWiki\Auth\AbstractPreAuthenticationProvider.
Definition at line 114 of file CaptchaPreAuthenticationProvider.php.
References $response, and ConfirmEditHooks\getInstance().
CaptchaPreAuthenticationProvider::testForAccountCreation | ( | $user, | |
$creator, | |||
array | $reqs ) |
Determine whether an account creation may begin.
Called from AuthManager::beginAccountCreation()
User | $user | User being created (not added to the database yet). This may become a "UserValue" in the future, or User may be refactored into such. |
User | $creator | User doing the creation. This may become a "UserValue" in the future, or User may be refactored into such. |
AuthenticationRequest[] | $reqs |
Reimplemented from MediaWiki\Auth\AbstractPreAuthenticationProvider.
Definition at line 94 of file CaptchaPreAuthenticationProvider.php.
References $success, $username, ConfirmEditHooks\getInstance(), makeError(), and verifyCaptcha().
CaptchaPreAuthenticationProvider::testForAuthentication | ( | array | $reqs | ) |
Determine whether an authentication may begin.
Called from AuthManager::beginAuthentication()
AuthenticationRequest[] | $reqs |
Reimplemented from MediaWiki\Auth\AbstractPreAuthenticationProvider.
Definition at line 66 of file CaptchaPreAuthenticationProvider.php.
References $success, $username, ConfirmEditHooks\getInstance(), makeError(), and verifyCaptcha().
|
protected |
Verify submitted captcha.
Assumes that the user has to pass the capctha (permission checks are caller's responsibility).
SimpleCaptcha | $captcha | |
AuthenticationRequest[] | $reqs | |
User | $user |
Definition at line 137 of file CaptchaPreAuthenticationProvider.php.
References $req.
Referenced by testForAccountCreation(), and testForAuthentication().