1 | <?php |
||
10 | final class TokenValidator implements TokenValidatorInterface |
||
11 | { |
||
12 | /** |
||
13 | * Validates the given token against the private key and incoming request. |
||
14 | * |
||
15 | * @param string $privateKey The private API key. |
||
16 | * @param Token $token The token extracted from the request. |
||
17 | * @param ServerRequestInterface $request The incoming PSR-7 request. |
||
18 | * |
||
19 | * @return boolean |
||
20 | * |
||
21 | * @throws AuthenticationException 401 Thrown hash is not valid. |
||
22 | */ |
||
23 | public function validate(string $privateKey, Token $token, ServerRequestInterface $request) : bool |
||
36 | } |
||
37 |