MediaWiki
1.30.0
|
A pre-authentication provider to call some legacy hooks. More...
Public Member Functions | |
testForAccountCreation ( $user, $creator, array $reqs) | |
Determine whether an account creation may begin. More... | |
testForAuthentication (array $reqs) | |
Determine whether an authentication may begin. More... | |
testUserForCreation ( $user, $autocreate, array $options=[]) | |
Determine whether an account may be created. More... | |
Public Member Functions inherited from MediaWiki\Auth\AbstractPreAuthenticationProvider | |
getAuthenticationRequests ( $action, array $options) | |
Return the applicable list of AuthenticationRequests. More... | |
postAccountCreation ( $user, $creator, AuthenticationResponse $response) | |
Post-creation callback. More... | |
postAccountLink ( $user, AuthenticationResponse $response) | |
Post-link callback. More... | |
postAuthentication ( $user, AuthenticationResponse $response) | |
Post-login callback. More... | |
testForAccountLink ( $user) | |
Determine whether an account may linked to another authentication method. More... | |
Public Member Functions inherited from MediaWiki\Auth\AbstractAuthenticationProvider | |
getUniqueId () | |
@inheritDoc More... | |
setConfig (Config $config) | |
Set configuration. More... | |
setLogger (LoggerInterface $logger) | |
setManager (AuthManager $manager) | |
Set AuthManager. More... | |
Protected Member Functions | |
makeFailResponse ( $user, $creator, $constant, $msg, $hook) | |
Construct an appropriate failure response. More... | |
Additional Inherited Members | |
Protected Attributes inherited from MediaWiki\Auth\AbstractAuthenticationProvider | |
Config | $config |
LoggerInterface | $logger |
AuthManager | $manager |
A pre-authentication provider to call some legacy hooks.
Definition at line 34 of file LegacyHookPreAuthenticationProvider.php.
|
protected |
Construct an appropriate failure response.
User | $user | |
User | null | $creator | |
int | $constant | LoginForm constant |
string | null | $msg | Message |
string | $hook | Hook |
Definition at line 123 of file LegacyHookPreAuthenticationProvider.php.
References $user, LoginForm\ABORTED, array(), LoginForm\CREATE_BLOCKED, LoginForm\EMPTY_PASS, LoginForm\ILLEGAL, LoginForm\NEED_TOKEN, StatusValue\newFatal(), StatusValue\newGood(), LoginForm\NO_NAME, LoginForm\NOT_EXISTS, LoginForm\RESET_PASS, LoginForm\SUCCESS, LoginForm\THROTTLED, LoginForm\USER_BLOCKED, LoginForm\USER_MIGRATED, wfEscapeWikiText(), LoginForm\WRONG_PASS, LoginForm\WRONG_PLUGIN_PASS, and LoginForm\WRONG_TOKEN.
Referenced by MediaWiki\Auth\LegacyHookPreAuthenticationProvider\testForAuthentication(), and MediaWiki\Auth\LegacyHookPreAuthenticationProvider\testUserForCreation().
MediaWiki\Auth\LegacyHookPreAuthenticationProvider::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 74 of file LegacyHookPreAuthenticationProvider.php.
References $ret, $user, StatusValue\newFatal(), StatusValue\newGood(), Hooks\run(), and wfMessage().
MediaWiki\Auth\LegacyHookPreAuthenticationProvider::testForAuthentication | ( | array | $reqs | ) |
Determine whether an authentication may begin.
Called from AuthManager::beginAuthentication()
AuthenticationRequest[] | $reqs |
Reimplemented from MediaWiki\Auth\AbstractPreAuthenticationProvider.
Definition at line 36 of file LegacyHookPreAuthenticationProvider.php.
References $req, $user, LoginForm\ABORTED, as, class, MediaWiki\Auth\AuthenticationRequest\getRequestByClass(), MediaWiki\Auth\LegacyHookPreAuthenticationProvider\makeFailResponse(), User\newFromName(), StatusValue\newGood(), Hooks\run(), LoginForm\USER_MIGRATED, and wfRandomString().
MediaWiki\Auth\LegacyHookPreAuthenticationProvider::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 |
|
Reimplemented from MediaWiki\Auth\AbstractPreAuthenticationProvider.
Definition at line 99 of file LegacyHookPreAuthenticationProvider.php.
References $user, LoginForm\ABORTED, MediaWiki\Auth\LegacyHookPreAuthenticationProvider\makeFailResponse(), StatusValue\newGood(), and Hooks\run().