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