Utility class for bot passwords.
More...
|
static | canonicalizeLoginData ( $username, $password) |
| There are two ways to login with a bot password: "username@appId", "password" and "username", "appId@password".
|
|
static | generatePassword ( $config) |
| Returns a (raw, unhashed) random password string.
|
|
static | getDB ( $db) |
| Get a database connection for the bot passwords database.
|
|
static | getSeparator () |
| Get the separator for combined user name + app ID.
|
|
static | invalidateAllPasswordsForCentralId ( $centralId) |
| Invalidate all passwords for a user, by central ID.
|
|
static | invalidateAllPasswordsForUser ( $username) |
| Invalidate all passwords for a user, by name.
|
|
static | login ( $username, $password, WebRequest $request) |
| Try to log the user in.
|
|
static | newFromCentralId ( $centralId, $appId, $flags=self::READ_NORMAL) |
| Load a BotPassword from the database.
|
|
static | newFromUser (User $user, $appId, $flags=self::READ_NORMAL) |
| Load a BotPassword from the database.
|
|
static | newUnsaved (array $data, $flags=self::READ_NORMAL) |
| Create an unsaved BotPassword.
|
|
static | removeAllPasswordsForCentralId ( $centralId) |
| Remove all passwords for a user, by central ID.
|
|
static | removeAllPasswordsForUser ( $username) |
| Remove all passwords for a user, by name.
|
|
Utility class for bot passwords.
- Since
- 1.27
Definition at line 28 of file BotPassword.php.
◆ __construct()
BotPassword::__construct |
( |
| $row, |
|
|
| $isSaved, |
|
|
| $flags = self::READ_NORMAL ) |
|
protected |
◆ canonicalizeLoginData()
static BotPassword::canonicalizeLoginData |
( |
| $username, |
|
|
| $password ) |
|
static |
There are two ways to login with a bot password: "username@appId", "password" and "username", "appId@password".
Transform it so it is always in the first form. Returns [bot username, bot password, could be normal password?] where the last one is a flag meaning this could either be a bot password or a normal password, it cannot be decided for certain (although in such cases it almost always will be a bot password). If this cannot be a bot password login just return false.
- Parameters
-
string | $username | |
string | $password | |
- Returns
- array|false
Definition at line 422 of file BotPassword.php.
References $username, and true.
◆ delete()
◆ generatePassword()
static BotPassword::generatePassword |
( |
| $config | ) |
|
|
static |
Returns a (raw, unhashed) random password string.
- Parameters
-
- Returns
- string
Definition at line 406 of file BotPassword.php.
◆ getAppId()
BotPassword::getAppId |
( |
| ) |
|
◆ getDB()
static BotPassword::getDB |
( |
| $db | ) |
|
|
static |
◆ getGrants()
BotPassword::getGrants |
( |
| ) |
|
◆ getPassword()
BotPassword::getPassword |
( |
| ) |
|
|
protected |
◆ getRestrictions()
BotPassword::getRestrictions |
( |
| ) |
|
◆ getSeparator()
static BotPassword::getSeparator |
( |
| ) |
|
|
static |
◆ getToken()
BotPassword::getToken |
( |
| ) |
|
◆ getUserCentralId()
BotPassword::getUserCentralId |
( |
| ) |
|
◆ invalidateAllPasswordsForCentralId()
static BotPassword::invalidateAllPasswordsForCentralId |
( |
| $centralId | ) |
|
|
static |
◆ invalidateAllPasswordsForUser()
static BotPassword::invalidateAllPasswordsForUser |
( |
| $username | ) |
|
|
static |
◆ isInvalid()
BotPassword::isInvalid |
( |
| ) |
|
◆ isSaved()
◆ login()
static BotPassword::login |
( |
| $username, |
|
|
| $password, |
|
|
WebRequest | $request ) |
|
static |
◆ newFromCentralId()
static BotPassword::newFromCentralId |
( |
| $centralId, |
|
|
| $appId, |
|
|
| $flags = self::READ_NORMAL ) |
|
static |
◆ newFromUser()
static BotPassword::newFromUser |
( |
User | $user, |
|
|
| $appId, |
|
|
| $flags = self::READ_NORMAL ) |
|
static |
◆ newUnsaved()
static BotPassword::newUnsaved |
( |
array | $data, |
|
|
| $flags = self::READ_NORMAL ) |
|
static |
◆ removeAllPasswordsForCentralId()
static BotPassword::removeAllPasswordsForCentralId |
( |
| $centralId | ) |
|
|
static |
◆ removeAllPasswordsForUser()
static BotPassword::removeAllPasswordsForUser |
( |
| $username | ) |
|
|
static |
◆ save()
BotPassword::save |
( |
| $operation, |
|
|
Password | $password = null ) |
◆ $appId
string BotPassword::$appId |
|
private |
◆ $centralId
int BotPassword::$centralId |
|
private |
◆ $flags
int BotPassword::$flags = self::READ_NORMAL |
|
private |
◆ $grants
string [] BotPassword::$grants |
|
private |
◆ $isSaved
bool BotPassword::$isSaved |
|
private |
◆ $restrictions
◆ $token
string BotPassword::$token |
|
private |
◆ APPID_MAXLENGTH
const BotPassword::APPID_MAXLENGTH = 32 |
The documentation for this class was generated from the following file: