Constants

NOT_VALID

NOT_VALID = 0 : integer

Constant for auth result

VALID

VALID = 1

Properties

$result

$result : integer

Authentication result

Type

integer

$username

$username : string

Authentication username

Type

string

$password

$password : string

Authentication password

Type

string

$filename

$filename : string

Auth file

Type

string

$realm

$realm : string

Auth realm

Type

string

$delimiter

$delimiter : string

Auth file delimiter

Type

string

Methods

getResult()

getResult() : integer

Get the authentication result

Returns

integer

isValid()

isValid() : boolean

Determine if the authentication attempt was valid

Returns

boolean

getUsername()

getUsername() : string

Get the username

Returns

string

getPassword()

getPassword() : string

Get the password

Returns

string

setUsername()

setUsername(string  $username) : \Pop\Auth\AbstractAuth

Set the username

Parameters

string $username

Returns

\Pop\Auth\AbstractAuth

setPassword()

setPassword(string  $password) : \Pop\Auth\AbstractAuth

Set the password

Parameters

string $password

Returns

\Pop\Auth\AbstractAuth

verify()

verify(string  $password, string  $hash) : boolean

Method to verify a password against a hash

Parameters

string $password
string $hash

Returns

boolean

authenticate()

authenticate(string  $username, string  $password) : integer

Method to authenticate

Parameters

string $username
string $password

Returns

integer

__construct()

__construct(string  $filename, string  $realm = null, string  $delimiter = ':') 

Constructor

Instantiate the File auth adapter object

Parameters

string $filename
string $realm
string $delimiter

Throws

\Pop\Auth\Exception

getFilename()

getFilename() : string

Get the auth filename

Returns

string

getRealm()

getRealm() : string

Get the auth realm

Returns

string

getDelimiter()

getDelimiter() : string

Get the auth file delimiter

Returns

string

setFilename()

setFilename(string  $filename) : \Pop\Auth\File

Set the auth filename

Parameters

string $filename

Throws

\Pop\Auth\Exception

Returns

\Pop\Auth\File

setRealm()

setRealm(string  $realm) : \Pop\Auth\File

Set the auth realm

Parameters

string $realm

Returns

\Pop\Auth\File

setDelimiter()

setDelimiter(string  $delimiter) : \Pop\Auth\File

Set the auth file delimiter

Parameters

string $delimiter

Returns

\Pop\Auth\File