| 1 | <?php |
||
| 13 | class ApiKeyHeaderPlugin implements AuthenticationPluginInterface |
||
| 14 | { |
||
| 15 | public const HEADER_NAME = 'X-Api-Key'; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * @var ApiKeyServiceInterface |
||
| 19 | */ |
||
| 20 | private $apiKeyService; |
||
| 21 | /** |
||
| 22 | * @var TranslatorInterface |
||
| 23 | */ |
||
| 24 | private $translator; |
||
| 25 | |||
| 26 | 3 | public function __construct(ApiKeyServiceInterface $apiKeyService, TranslatorInterface $translator) |
|
| 31 | |||
| 32 | /** |
||
| 33 | * @throws VerifyAuthenticationException |
||
| 34 | */ |
||
| 35 | 2 | public function verify(ServerRequestInterface $request): void |
|
| 47 | |||
| 48 | 1 | public function update(ServerRequestInterface $request, ResponseInterface $response): ResponseInterface |
|
| 52 | } |
||
| 53 |