PHP Class Baikal\Core\PDOBasicAuth

Format of the database tables must match to the one of \Sabre\DAV\Auth\Backend\PDO
Author: Lukasz Janyst ([email protected])
Inheritance: extends Sabre\DAV\Auth\Backend\AbstractBasic
Show file Open project: jeromeschneider/baikal

Protected Properties

Property Type Description
$authRealm string Authentication realm
$pdo PDO Reference to PDO connection
$tableName string PDO table name we'll be using

Public Methods

Method Description
__construct ( PDO $pdo, $authRealm, string $tableName = 'users' ) Creates the backend object.
validateUserPass ( string $username, string $password ) : boolean Validates a username and password

Method Details

__construct() public method

If the filename argument is passed in, it will parse out the specified file fist.
public __construct ( PDO $pdo, $authRealm, string $tableName = 'users' )
$pdo PDO
$tableName string The PDO table name to use

validateUserPass() public method

This method should return true or false depending on if login succeeded.
public validateUserPass ( string $username, string $password ) : boolean
$username string
$password string
return boolean

Property Details

$authRealm protected property

Authentication realm
protected string $authRealm
return string

$pdo protected property

Reference to PDO connection
protected PDO $pdo
return PDO

$tableName protected property

PDO table name we'll be using
protected string $tableName
return string