|
@@ -93,7 +93,7 @@ discard block |
|
|
block discarded – undo |
|
93
|
93
|
|
|
94
|
94
|
$token = str_replace('Bearer ', '', $request->header('authorization')); |
|
95
|
95
|
|
|
96
|
|
- if(!$token){ |
|
|
96
|
+ if (!$token) { |
|
97
|
97
|
throw new AuthenticationFailedException('Empty Token!'); |
|
98
|
98
|
} |
|
99
|
99
|
|
|
@@ -113,7 +113,7 @@ discard block |
|
|
block discarded – undo |
|
113
|
113
|
throw new UserNotPermittedException(); |
|
114
|
114
|
} |
|
115
|
115
|
|
|
116
|
|
- }else{ |
|
|
116
|
+ } else { |
|
117
|
117
|
return (App::make(\Dingo\Api\Http\Middleware\Auth::class))->handle($request, $next); |
|
118
|
118
|
// another way to do handle this is by calling `$user = $this->jwtAuthAdapter->toUser($token);` |
|
119
|
119
|
// and continuing the execution of this code till the last return, but to maintain consistency |
Please login to merge, or discard this patch.