MediaWiki REL1_32
|
A base class that implements some of the boilerplate for a PreAuthenticationProvider. More...
Public Member Functions | |
getAuthenticationRequests ( $action, array $options) | |
Return the applicable list of AuthenticationRequests. | |
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\AbstractAuthenticationProvider | |
getUniqueId () | |
@inheritDoc | |
setConfig (Config $config) | |
Set configuration. | |
setLogger (LoggerInterface $logger) | |
setManager (AuthManager $manager) | |
Set AuthManager. | |
Additional Inherited Members | |
Protected Attributes inherited from MediaWiki\Auth\AbstractAuthenticationProvider | |
Config | $config |
LoggerInterface | $logger |
AuthManager | $manager |
A base class that implements some of the boilerplate for a PreAuthenticationProvider.
Definition at line 29 of file AbstractPreAuthenticationProvider.php.
MediaWiki\Auth\AbstractPreAuthenticationProvider::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:
|
Implements MediaWiki\Auth\AuthenticationProvider.
Definition at line 33 of file AbstractPreAuthenticationProvider.php.
MediaWiki\Auth\AbstractPreAuthenticationProvider::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) |
Implements MediaWiki\Auth\PreAuthenticationProvider.
Definition at line 52 of file AbstractPreAuthenticationProvider.php.
MediaWiki\Auth\AbstractPreAuthenticationProvider::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) |
Implements MediaWiki\Auth\PreAuthenticationProvider.
Definition at line 59 of file AbstractPreAuthenticationProvider.php.
MediaWiki\Auth\AbstractPreAuthenticationProvider::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) |
Implements MediaWiki\Auth\PreAuthenticationProvider.
Reimplemented in MediaWiki\Auth\ThrottlePreAuthenticationProvider.
Definition at line 41 of file AbstractPreAuthenticationProvider.php.
MediaWiki\Auth\AbstractPreAuthenticationProvider::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 |
Implements MediaWiki\Auth\PreAuthenticationProvider.
Reimplemented in MediaWiki\Auth\LegacyHookPreAuthenticationProvider, and MediaWiki\Auth\ThrottlePreAuthenticationProvider.
Definition at line 44 of file AbstractPreAuthenticationProvider.php.
MediaWiki\Auth\AbstractPreAuthenticationProvider::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. |
Implements MediaWiki\Auth\PreAuthenticationProvider.
Definition at line 55 of file AbstractPreAuthenticationProvider.php.
MediaWiki\Auth\AbstractPreAuthenticationProvider::testForAuthentication | ( | array | $reqs | ) |
Determine whether an authentication may begin.
Called from AuthManager::beginAuthentication()
AuthenticationRequest[] | $reqs |
Implements MediaWiki\Auth\PreAuthenticationProvider.
Reimplemented in MediaWiki\Auth\LegacyHookPreAuthenticationProvider, and MediaWiki\Auth\ThrottlePreAuthenticationProvider.
Definition at line 37 of file AbstractPreAuthenticationProvider.php.
MediaWiki\Auth\AbstractPreAuthenticationProvider::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 |
|
Implements MediaWiki\Auth\PreAuthenticationProvider.
Reimplemented in MediaWiki\Auth\LegacyHookPreAuthenticationProvider.
Definition at line 48 of file AbstractPreAuthenticationProvider.php.