Skip to content

Commit

Permalink
Merge pull request #12 from GrapheneICT/develop
Browse files Browse the repository at this point in the history
Update JwtGuard.php
  • Loading branch information
jstojiljkovic authored Sep 25, 2022
2 parents bb4959e + 143aeea commit e074cab
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Services/Auth/JwtGuard.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace GrapheneICT\CognitoGuard\Services\Auth;

use ErrorException;
use GrapheneICT\CognitoGuard\Exceptions\InvalidTokenException;
use GrapheneICT\CognitoGuard\Services\CognitoService;
use GrapheneICT\CognitoGuard\Services\JwtService;
use Illuminate\Auth\GuardHelpers;
Expand Down Expand Up @@ -44,7 +45,7 @@ public function user()
$token = $this->request->bearerToken();

if (! $token) {
abort(403, 'Token is missing');
throw new InvalidTokenException('Token is missing');
}

$jwtService = new JwtService();
Expand Down

0 comments on commit e074cab

Please sign in to comment.