52 lines
547 B
PHP
52 lines
547 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
namespace davina\auths;
|
||
|
|
|
||
|
|
require_once('vendor/autoload.php');
|
||
|
|
|
||
|
|
|
||
|
|
/**
|
||
|
|
*/
|
||
|
|
class class_auth_static implements interface_auth
|
||
|
|
{
|
||
|
|
|
||
|
|
/**
|
||
|
|
*/
|
||
|
|
private string $password;
|
||
|
|
|
||
|
|
|
||
|
|
/**
|
||
|
|
*/
|
||
|
|
public function __construct(
|
||
|
|
string $password
|
||
|
|
)
|
||
|
|
{
|
||
|
|
$this->password = $password;
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
/**
|
||
|
|
* [implementation]
|
||
|
|
*/
|
||
|
|
function check(
|
||
|
|
array $credentials
|
||
|
|
) : bool
|
||
|
|
{
|
||
|
|
return ($credentials['password'] === $this->password);
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
/**
|
||
|
|
* [implementation]
|
||
|
|
*/
|
||
|
|
function determine_parameters(
|
||
|
|
array $credentials
|
||
|
|
) : array
|
||
|
|
{
|
||
|
|
return [];
|
||
|
|
}
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
?>
|