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