MediaWiki
1.33.0
|
Hooks for Extension:OATHAuth. More...
Static Public Member Functions | |
static | getOATHUserRepository () |
Get the singleton OATH user repository. More... | |
static | onAuthChangeFormFields (array $requests, array $fieldInfo, array &$formDescriptor, $action) |
static | onGetPreferences (User $user, array &$preferences) |
Add the necessary user preferences for OATHAuth. More... | |
static | onLoadExtensionSchemaUpdates ( $updater) |
static | onTwoFactorIsEnabled (&$isEnabled) |
Determine if two-factor authentication is enabled for $wgUser. More... | |
static | schemaUpdateOldUsers (IDatabase $db) |
Helper function for converting old users to the new schema. More... | |
static | schemaUpdateOldUsersFromInstaller (DatabaseUpdater $updater) |
Helper function for converting old users to the new schema. More... | |
Hooks for Extension:OATHAuth.
Definition at line 28 of file OATHAuthHooks.php.
|
static |
Get the singleton OATH user repository.
Definition at line 34 of file OATHAuthHooks.php.
Referenced by SpecialDisableOATHForUser\__construct(), TOTPSecondaryAuthenticationProvider\beginSecondaryAuthentication(), TOTPSecondaryAuthenticationProvider\continueSecondaryAuthentication(), DisableOATHAuthForUser\execute(), ApiOATHValidate\execute(), ApiQueryOATH\execute(), SpecialOATH\getTargetPage(), OATHAuthUtils\isEnabledFor(), onGetPreferences(), onTwoFactorIsEnabled(), and OATHAuthKey\verifyToken().
|
static |
AuthenticationRequest[] | $requests | |
array | $fieldInfo | Field information array (union of the AuthenticationRequest::getFieldInfo() responses). |
array | &$formDescriptor | HTMLForm descriptor. The special key 'weight' can be set to change the order of the fields. |
string | $action | One of the AuthManager::ACTION_* constants. |
Definition at line 63 of file OATHAuthHooks.php.
References $formDescriptor.
Add the necessary user preferences for OATHAuth.
User | $user | |
array | &$preferences |
Definition at line 114 of file OATHAuthHooks.php.
References $user, getOATHUserRepository(), SpecialPage\getTitleFor(), string, text, and wfMessage().
|
static |
DatabaseUpdater | $updater |
Definition at line 146 of file OATHAuthHooks.php.
References $base.
|
static |
Determine if two-factor authentication is enabled for $wgUser.
This isn't the preferred mechanism for controlling access to sensitive features (see AuthManager::securitySensitiveOperationStatus() for that) but there is no harm in keeping it.
bool | &$isEnabled | Will be set to true if enabled, false otherwise |
Definition at line 90 of file OATHAuthHooks.php.
References $user, getOATHUserRepository(), and null.
|
static |
Helper function for converting old users to the new schema.
IDatabase | $db |
Definition at line 191 of file OATHAuthHooks.php.
References $res, as, Wikimedia\Rdbms\IDatabase\delete(), Wikimedia\Rdbms\IDatabase\fieldExists(), Wikimedia\Rdbms\IDatabase\select(), unserialize(), and Wikimedia\Rdbms\IDatabase\update().
Referenced by UpdateScratchTokenFormat\execute(), and schemaUpdateOldUsersFromInstaller().
|
static |
Helper function for converting old users to the new schema.
DatabaseUpdater | $updater |
Definition at line 180 of file OATHAuthHooks.php.
References schemaUpdateOldUsers().