Conditions | 1 |
Paths | 1 |
Total Lines | 5 |
Code Lines | 3 |
Lines | 0 |
Ratio | 0 % |
Tests | 3 |
CRAP Score | 1 |
Changes | 0 |
1 | <?php |
||
13 | 2 | public function verify(Request $request, Collection $config): bool |
|
14 | { |
||
15 | 2 | $generatedHash = hash_hmac('sha256', $request->getContent(), $config->get('token')); |
|
16 | 2 | return hash_equals($generatedHash, $request->header('X-Hub-Signature')); |
|
17 | } |
||
18 | 1 | public function headers(): array |
|
22 | } |