MediaWiki REL1_32
|
Hooks for Extension:OATHAuth. More...
Static Public Member Functions | |
static | getOATHUserRepository () |
Get the singleton OATH user repository. | |
static | onAuthChangeFormFields (array $requests, array $fieldInfo, array &$formDescriptor, $action) |
static | onGetPreferences (User $user, array &$preferences) |
Add the necessary user preferences for OATHAuth. | |
static | onLoadExtensionSchemaUpdates ( $updater) |
static | onTwoFactorIsEnabled (&$isEnabled) |
Determine if two-factor authentication is enabled for $wgUser. | |
static | schemaUpdateOldUsers (IDatabase $db) |
Helper function for converting old users to the new schema. | |
static | schemaUpdateOldUsersFromInstaller (DatabaseUpdater $updater) |
Helper function for converting old users to the new schema. | |
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 TOTPSecondaryAuthenticationProvider\beginSecondaryAuthentication(), TOTPSecondaryAuthenticationProvider\continueSecondaryAuthentication(), ApiOATHValidate\execute(), ApiQueryOATH\execute(), DisableOATHAuthForUser\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 getOATHUserRepository(), 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 getOATHUserRepository().
|
static |
Helper function for converting old users to the new schema.
IDatabase | $db |
Definition at line 191 of file OATHAuthHooks.php.
References $res, 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().