Properties

$encryption

$encryption : integer

Encryption method to use

Type

integer

$encryptionOptions

$encryptionOptions : array

Encryption options. Possible options are:

'salt' // Custom Salt 'secret' // Secret pepper

'cost' // Bcrypt cost 'prefix' // Bcrypt prefix

'rounds' // Sha rounds

'cipher' // Mcrypt cipher 'mode' // Mcrypt cipher 'source' // Mcrypt source

Type

array

$username

$username : string

Username to authenticate against

Type

string

$password

$password : string

Password to authenticate against

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

setEncryption()

setEncryption(integer  $encryption, array  $options = array()) : \Pop\Auth\Adapter\AbstractAdapter

Method to set the encryption

Parameters

integer $encryption
array $options

Returns

\Pop\Auth\Adapter\AbstractAdapter

setEncryptionOptions()

setEncryptionOptions(array  $options = array()) : \Pop\Auth\Adapter\AbstractAdapter

Method to set the encryption options

Parameters

array $options

Returns

\Pop\Auth\Adapter\AbstractAdapter

getEncryption()

getEncryption() : integer

Get encryption

Returns

integer

getEncryptionOptions()

getEncryptionOptions() : array

Get encryption options

Returns

array

verifyPassword()

verifyPassword(string  $hash, string  $attemptedPassword) : boolean

Method to verify password

Parameters

string $hash
string $attemptedPassword

Returns

boolean

getUsername()

getUsername() : string

Get the username

Returns

string

getPassword()

getPassword() : string

Get the password

Returns

string

setUsername()

setUsername(string  $username) : \Pop\Auth\Adapter\AbstractAdapter

Set the username

Parameters

string $username

Returns

\Pop\Auth\Adapter\AbstractAdapter

setPassword()

setPassword(string  $password) : \Pop\Auth\Adapter\AbstractAdapter

Set the password

Parameters

string $password

Returns

\Pop\Auth\Adapter\AbstractAdapter

authenticate()

authenticate() : integer

Method to authenticate

Returns

integer

__construct()

__construct(string  $filename, integer  $encryption, array  $options = array()) : \Pop\Auth\Adapter\File

Constructor

Instantiate the File auth adapter object

Parameters

string $filename
integer $encryption
array $options

Returns

\Pop\Auth\Adapter\File

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\Adapter\File

Set the auth filename

Parameters

string $filename

Throws

\Pop\Auth\Adapter\Exception

Returns

\Pop\Auth\Adapter\File

setRealm()

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

Set the auth realm

Parameters

string $realm

Returns

\Pop\Auth\Adapter\File

setDelimiter()

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

Set the auth file delimiter

Parameters

string $delimiter

Returns

\Pop\Auth\Adapter\File