|
Vaskovsky Web Application
3.17.0306
|
Performs basic HTTP authentication. More...


Public Member Functions | |
| __construct ($realm,\PDO $pdo, $table) | |
| Creates a new instance. More... | |
| getAccountAttribute ($name) | |
| Returns an account attribute. More... | |
| getPasswordHash ($password) | |
| Creates a new password hash. More... | |
| signOut () | |
| Signs out. More... | |
| authenticate () | |
| Performs authentication. More... | |
Performs basic HTTP authentication.
Definition at line 23 of file BasicAuthentication.php.
| AVaskovsky\WebApplication\BasicAuthentication::__construct | ( | $realm, | |
| \PDO | $pdo, | ||
| $table | |||
| ) |
Creates a new instance.
| string | $realm | is a realm string for the HTTP Authentication. |
| PDO | $pdo | is a PDO connection. |
| string | $table | is a table name where user data is stored. |
| InvalidArgumentException | : if $pdo is null; if $table is empty. |
Definition at line 41 of file BasicAuthentication.php.
| AVaskovsky\WebApplication\BasicAuthentication::authenticate | ( | ) |
Performs authentication.
Implements AVaskovsky\WebApplication\AbstractAuthentication.
Definition at line 112 of file BasicAuthentication.php.
| AVaskovsky\WebApplication\BasicAuthentication::getAccountAttribute | ( | $name | ) |
Returns an account attribute.
This method performs authentication if user is not authenticated yet, loads account attributes and returns a value of the specified attribute.
| string | $name | is an attribute name. |
| InvalidArgumentException | if $name is empty. |
Implements AVaskovsky\WebApplication\AbstractAuthentication.
Definition at line 68 of file BasicAuthentication.php.
| AVaskovsky\WebApplication\BasicAuthentication::getPasswordHash | ( | $password | ) |
Creates a new password hash.
| string | $password | is a password string. |
| InvalidArgumentException | if $password is null. |
Implements AVaskovsky\WebApplication\AbstractAuthentication.
Definition at line 83 of file BasicAuthentication.php.
| AVaskovsky\WebApplication\BasicAuthentication::signOut | ( | ) |
Signs out.
Implements AVaskovsky\WebApplication\AbstractAuthentication.
Definition at line 97 of file BasicAuthentication.php.