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

$table

$table : string

DB table name / class name

Type

string

$usernameField

$usernameField : string

Username field

Type

string

$passwordField

$passwordField : string

Password field

Type

string

$user

$user : \Pop\Db\Record

DB table name / class name

Type

\Pop\Db\Record

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  $table, integer  $encryption, array  $options = array()) : \Pop\Auth\Adapter\Table

Constructor

Instantiate the Table auth adapter object

Parameters

string $table
integer $encryption
array $options

Returns

\Pop\Auth\Adapter\Table

getTable()

getTable() : string

Get the table name

Returns

string

getUsernameField()

getUsernameField() : string

Get the username field

Returns

string

getPasswordField()

getPasswordField() : string

Get the password field

Returns

string

getUser()

getUser() : \Pop\Db\Record

Get the user object

Returns

\Pop\Db\Record

setTable()

setTable(string  $table) : \Pop\Auth\Adapter\Table

Set the table name

Parameters

string $table

Returns

\Pop\Auth\Adapter\Table

setUsernameField()

setUsernameField(string  $usernameField = 'username') : \Pop\Auth\Adapter\Table

Set the username field

Parameters

string $usernameField

Returns

\Pop\Auth\Adapter\Table

setPasswordField()

setPasswordField(string  $passwordField = 'password') : \Pop\Auth\Adapter\Table

Set the password field

Parameters

string $passwordField

Returns

\Pop\Auth\Adapter\Table