File
extends AbstractAuth
in package
File auth class
Tags
Table of Contents
Constants
Properties
- $delimiter : string
- Auth file delimiter
- $filename : string|null
- Auth file
- $password : string|null
- Authentication password
- $realm : string|null
- Auth realm
- $result : int
- Authentication result
- $username : string|null
- Authentication username
Methods
- __construct() : mixed
- Constructor
- authenticate() : int
- Method to authenticate
- getDelimiter() : string
- Get the auth file delimiter
- getFilename() : string
- Get the auth filename
- getPassword() : string|null
- Get the password
- getRealm() : string|null
- Get the auth realm
- getResult() : int
- Get the authentication result
- getUsername() : string|null
- Get the username
- isAuthenticated() : bool
- Determine if the authentication attempt was successful
- setDelimiter() : File
- Set the auth file delimiter
- setFilename() : File
- Set the auth filename
- setPassword() : AbstractAuth
- Set the password
- setRealm() : File
- Set the auth realm
- setUsername() : AbstractAuth
- Set the username
- verify() : bool
- Method to verify a password against a hash
Constants
NOT_VALID
Constant for auth result
public
int
NOT_VALID
= 0
VALID
public
mixed
VALID
= 1
Properties
$delimiter
Auth file delimiter
protected
string
$delimiter
= ':'
$filename
Auth file
protected
string|null
$filename
= null
$password
Authentication password
protected
string|null
$password
= null
$realm
Auth realm
protected
string|null
$realm
= null
$result
Authentication result
protected
int
$result
= 0
$username
Authentication username
protected
string|null
$username
= null
Methods
__construct()
Constructor
public
__construct(string $filename[, string|null $realm = null ][, string $delimiter = ':' ]) : mixed
Instantiate the File auth adapter object
Parameters
- $filename : string
- $realm : string|null = null
- $delimiter : string = ':'
Tags
authenticate()
Method to authenticate
public
authenticate(string $username, string $password) : int
Parameters
- $username : string
- $password : string
Return values
intgetDelimiter()
Get the auth file delimiter
public
getDelimiter() : string
Return values
stringgetFilename()
Get the auth filename
public
getFilename() : string
Return values
stringgetPassword()
Get the password
public
getPassword() : string|null
Return values
string|nullgetRealm()
Get the auth realm
public
getRealm() : 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
boolsetDelimiter()
Set the auth file delimiter
public
setDelimiter(string $delimiter) : File
Parameters
- $delimiter : string
Return values
FilesetFilename()
Set the auth filename
public
setFilename(string $filename) : File
Parameters
- $filename : string
Tags
Return values
FilesetPassword()
Set the password
public
setPassword(string $password) : AbstractAuth
Parameters
- $password : string
Return values
AbstractAuthsetRealm()
Set the auth realm
public
setRealm(string $realm) : File
Parameters
- $realm : string
Return values
FilesetUsername()
Set the username
public
setUsername(string $username) : AbstractAuth
Parameters
- $username : string
Return values
AbstractAuthverify()
Method to verify a password against a hash
public
verify(string $password, string $hash) : bool
Parameters
- $password : string
- $hash : string