MediaWiki REL1_40
|
A pre-authentication provider can prevent authentication early on. More...
Inherits MediaWiki\Auth\AuthenticationProvider.
Inherited by MediaWiki\Auth\AbstractPreAuthenticationProvider.
Public Member Functions | |
postAccountCreation ( $user, $creator, AuthenticationResponse $response) | |
Post-creation callback. | |
postAccountLink ( $user, AuthenticationResponse $response) | |
Post-link callback. | |
postAuthentication ( $user, AuthenticationResponse $response) | |
Post-login callback. | |
testForAccountCreation ( $user, $creator, array $reqs) | |
Determine whether an account creation may begin. | |
testForAccountLink ( $user) | |
Determine whether an account may linked to another authentication method. | |
testForAuthentication (array $reqs) | |
Determine whether an authentication may begin. | |
testUserForCreation ( $user, $autocreate, array $options=[]) | |
Determine whether an account may be created. | |
Public Member Functions inherited from MediaWiki\Auth\AuthenticationProvider | |
getAuthenticationRequests ( $action, array $options) | |
Return the applicable list of AuthenticationRequests. | |
getUniqueId () | |
Return a unique identifier for this instance. | |
setConfig (Config $config) | |
Set configuration. | |
setHookContainer (HookContainer $hookContainer) | |
setManager (AuthManager $manager) | |
Set AuthManager. | |
A pre-authentication provider can prevent authentication early on.
A PreAuthenticationProvider is used to supply arbitrary checks to be performed before the PrimaryAuthenticationProviders are consulted during the login / account creation / account linking process. Possible uses include checking that a per-IP throttle has not been reached or that a captcha has been solved.
This interface also provides callbacks that are invoked after login / account creation / account linking succeeded or failed.
Definition at line 44 of file PreAuthenticationProvider.php.
MediaWiki\Auth\PreAuthenticationProvider::postAccountCreation | ( | $user, | |
$creator, | |||
AuthenticationResponse | $response ) |
Post-creation callback.
This will be called at the end of an account creation attempt. It will not be called if the account creation process results in a session timeout (possibly after a successful user creation, while a secondary provider is waiting for a response).
User | $user | User that was attempted to be created. 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. |
AuthenticationResponse | $response | Authentication response that will be returned (PASS or FAIL) |
Implemented in MediaWiki\Auth\AbstractPreAuthenticationProvider.
MediaWiki\Auth\PreAuthenticationProvider::postAccountLink | ( | $user, | |
AuthenticationResponse | $response ) |
Post-link callback.
This will be called at the end of an account linking attempt.
User | $user | User that was attempted to be linked. 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) |
Implemented in MediaWiki\Auth\AbstractPreAuthenticationProvider.
MediaWiki\Auth\PreAuthenticationProvider::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) |
Implemented in MediaWiki\Auth\AbstractPreAuthenticationProvider, and MediaWiki\Auth\ThrottlePreAuthenticationProvider.
MediaWiki\Auth\PreAuthenticationProvider::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 |
Implemented in MediaWiki\Auth\AbstractPreAuthenticationProvider, and MediaWiki\Auth\ThrottlePreAuthenticationProvider.
MediaWiki\Auth\PreAuthenticationProvider::testForAccountLink | ( | $user | ) |
Determine whether an account may linked to another authentication method.
User | $user | User being linked. This may become a "UserValue" in the future, or User may be refactored into such. |
Implemented in MediaWiki\Auth\AbstractPreAuthenticationProvider.
MediaWiki\Auth\PreAuthenticationProvider::testForAuthentication | ( | array | $reqs | ) |
Determine whether an authentication may begin.
Called from AuthManager::beginAuthentication()
AuthenticationRequest[] | $reqs |
Implemented in MediaWiki\Auth\AbstractPreAuthenticationProvider, and MediaWiki\Auth\ThrottlePreAuthenticationProvider.
MediaWiki\Auth\PreAuthenticationProvider::testUserForCreation | ( | $user, | |
$autocreate, | |||
array | $options = [] ) |
Determine whether an account may be created.
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. |
bool | string | $autocreate | False if this is not an auto-creation, or the source of the auto-creation passed to AuthManager::autoCreateUser(). |
array | $options |
|
Implemented in MediaWiki\Auth\AbstractPreAuthenticationProvider.