UserAdapter
in package
implements
AdapterInterface
Table of Contents
Interfaces
- AdapterInterface
Properties
- $bcrypt : Bcrypt
- $login : string
- $loginAttemptService : LoginAttempt
- $mapper : User
- $password : string
- $pwnedPasswordsService : PwnedPasswords
- $translator : Translator
Methods
- __construct() : mixed
- authenticate() : Result
- Try to authenticate.
- getMapper() : User
- Get the mapper.
- setCredentials() : void
- Sets the credentials used to authenticate.
- verifyPassword() : bool
- Verify a password.
Properties
$bcrypt read-only
private
Bcrypt
$bcrypt
$login
private
string
$login
$loginAttemptService read-only
private
LoginAttempt
$loginAttemptService
$mapper read-only
private
User
$mapper
$password
private
string
$password
$pwnedPasswordsService read-only
private
PwnedPasswords
$pwnedPasswordsService
$translator read-only
private
Translator
$translator
Methods
__construct()
public
__construct(Translator $translator, Bcrypt $bcrypt, LoginAttempt $loginAttemptService, PwnedPasswords $pwnedPasswordsService, User $mapper) : mixed
Parameters
- $translator : Translator
- $bcrypt : Bcrypt
- $loginAttemptService : LoginAttempt
- $pwnedPasswordsService : PwnedPasswords
- $mapper : User
authenticate()
Try to authenticate.
public
authenticate() : Result
Return values
ResultgetMapper()
Get the mapper.
public
getMapper() : User
Return values
UsersetCredentials()
Sets the credentials used to authenticate.
public
setCredentials(string $login, string $password) : void
Parameters
- $login : string
- $password : string
verifyPassword()
Verify a password.
public
verifyPassword(string $password, string $hash) : bool
Parameters
- $password : string
- $hash : string