Conditions | 4 |
Paths | 4 |
Total Lines | 16 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 3 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
42 | private function getAuthMiddleware() |
||
43 | { |
||
44 | $disable = $this->isAuthDisable(); |
||
45 | if ($disable) { |
||
46 | return null; |
||
47 | } |
||
48 | |||
49 | $authMiddleware = 'auth.basic'; |
||
50 | |||
51 | if (interface_exists(\Illuminate\Contracts\Auth\Factory::class)) { |
||
52 | $manager = App::make(\Illuminate\Contracts\Auth\Factory::class); |
||
53 | $authMiddleware = $manager->guard('api') ? 'auth:api' : $authMiddleware; |
||
54 | } |
||
55 | |||
56 | return $authMiddleware; |
||
57 | } |
||
58 | |||
67 |