Conditions | 3 |
Paths | 2 |
Total Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
43 | public function handle(Request $request, \Closure $next) |
||
44 | { |
||
45 | if ($request->hasHeader('Authorization') && $request->header('Authorization') === $this->getExpectedAuthorizationLine()) { |
||
46 | return $next($request); |
||
47 | } |
||
48 | |||
49 | throw new \InvalidArgumentException('Invalid webhook authentication'); |
||
50 | } |
||
51 | |||
61 |