1 | <?php |
||
8 | class Verifier |
||
9 | { |
||
10 | /** |
||
11 | * @var Calculator |
||
12 | */ |
||
13 | private $calculator; |
||
14 | |||
15 | 72 | public function __construct() |
|
19 | |||
20 | /** |
||
21 | * @param MessageInterface $message |
||
22 | * @param string $secret |
||
23 | * |
||
24 | * @return bool Signature verification outcome. |
||
25 | * |
||
26 | * @throws \InvalidArgumentException When $message is an implementation of |
||
27 | * MessageInterface that cannot be |
||
28 | * serialized and thus neither verified. |
||
29 | */ |
||
30 | 72 | public function verify(MessageInterface $message, $secret) |
|
46 | |||
47 | /** |
||
48 | * @param MessageInterface $message |
||
49 | * |
||
50 | * @return MessageInterface |
||
51 | */ |
||
52 | 70 | private function withoutUnsignedHeaders(MessageInterface $message) |
|
64 | } |
||
65 |