AuthInterface
in
Auth interface
Tags
Table of Contents
Methods
- authenticate() : int
- Method to authenticate
- getPassword() : string|null
- Get the password
- getResult() : int
- Get the authentication result
- getUsername() : string|null
- Get the username
- isAuthenticated() : bool
- Determine if the authentication attempt was successful
- needsRehash() : bool
- Determine if the last verified hash should be rehashed
- setPassword() : AuthInterface
- Set the password
- setUsername() : AuthInterface
- Set the username
- verify() : bool
- Method to verify a password against a hash
Methods
authenticate()
Method to authenticate
public
authenticate(string $credential[, string|null $secondary = null ]) : int
Parameters
- $credential : string
- $secondary : string|null = null
Tags
Return values
intgetPassword()
Get the password
public
getPassword() : string|null
Return values
string|nullgetResult()
Get the authentication result
public
getResult() : int
Return values
intgetUsername()
Get the username
public
getUsername() : string|null
Return values
string|nullisAuthenticated()
Determine if the authentication attempt was successful
public
isAuthenticated() : bool
Return values
boolneedsRehash()
Determine if the last verified hash should be rehashed
public
needsRehash() : bool
Return values
boolsetPassword()
Set the password
public
setPassword(string $password) : AuthInterface
Parameters
- $password : string
Return values
AuthInterfacesetUsername()
Set the username
public
setUsername(string $username) : AuthInterface
Parameters
- $username : string
Return values
AuthInterfaceverify()
Method to verify a password against a hash
public
verify(string $password, string $hash) : bool
Parameters
- $password : string
- $hash : string