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

$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 : mixed

User record

Type

mixed

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  $table, string  $usernameField = 'username', string  $passwordField = 'password') 

Constructor

Instantiate the File auth adapter object

Parameters

string $table
string $usernameField
string $passwordField

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

setTable()

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

Set the table name

Parameters

string $table

Returns

\Pop\Auth\Table

setUsernameField()

setUsernameField(string  $usernameField) : \Pop\Auth\Table

Set the username field

Parameters

string $usernameField

Returns

\Pop\Auth\Table

setPasswordField()

setPasswordField(string  $passwordField) : \Pop\Auth\Table

Set the password field

Parameters

string $passwordField

Returns

\Pop\Auth\Table

getUser()

getUser() : mixed

Get the user record

Returns

mixed