Method |
Description |
|
__construct ( EncryptionKey $key, Airship\Engine\Contract\DBInterface $db = null ) |
Authentication constructor. |
|
createAuthToken ( integer $userId ) : string |
Create, store, and return a token for long-term authentication |
|
createHash ( HiddenString $password ) : string |
Generate a hash of a password |
|
login ( string $username, HiddenString $password ) : boolean | integer |
Verifies that the password is valid for a given user account. Returns
false whether or not the user name is valid and attempts to minimize
leaking that information through timing side-channels. |
|
loginByToken ( string $token = '' ) : integer |
Authenticate a user by a long-term authentication token (e.g. a cookie). |
|
migrateImportedHash ( HiddenString $password, HiddenString $passwordHash, array $userData = [] ) : boolean |
Attempt to login against a migrated hash. If successful,
replace the existing password hash with an encrypted hash
of the original password. |
|
rotateToken ( string $token, integer $userId ) : mixed |
Replace the existing long-term authentication cookie |
|
setDatabase ( Airship\Engine\Contract\DBInterface $db ) : self |
Sets the database handler. |
|
setDatabaseByKey ( string $dbIndex = '' ) : self |
Set the database of this authentication library to match this |
|
setLongTermSelectorField ( string $field ) : self |
Sets the column name used to reference the "selector" component of the
long-term authentication token. |
|
setLongTermValidatorField ( string $field ) : self |
Sets the column name used to reference the "validator" component of the
long-term authentication token. |
|
setPasswordField ( string $field ) : self |
Sets the column name used to reference the password hash stored in the
database, for SQL queries. |
|
setTable ( string $table ) : self |
Change the table used for |
|
setUserIdField ( string $field ) : self |
Sets the column name used to reference the primary key (userid) |
|
setUsernameField ( string $field ) : self |
Sets the column name used to reference the user selector, for SQL
queries. |
|