1 | <?php |
||
7 | class BasicAuthentication implements ApiAuthorizationInterface |
||
8 | { |
||
9 | /** @var array */ |
||
10 | private $authentications; |
||
11 | |||
12 | /** @var IRequest */ |
||
13 | private $httpRequest; |
||
14 | |||
15 | /** |
||
16 | * @param array<string, string> $autentications - available username - password pairs |
||
17 | * @param IRequest $httpRequest |
||
18 | */ |
||
19 | public function __construct(array $autentications, IRequest $httpRequest) |
||
24 | |||
25 | /** |
||
26 | * {@inheritdoc} |
||
27 | */ |
||
28 | public function authorized(): bool |
||
37 | |||
38 | /** |
||
39 | * {@inheritdoc} |
||
40 | */ |
||
41 | public function getErrorMessage(): ?string |
||
45 | } |
||
46 |