diff --git a/src/Http/Middleware/AuthenticateApi.php b/src/Http/Middleware/AuthenticateApi.php index 99d5890..9f6d21e 100644 --- a/src/Http/Middleware/AuthenticateApi.php +++ b/src/Http/Middleware/AuthenticateApi.php @@ -20,7 +20,7 @@ protected function authenticate($request, array $guards): void $guard = MoonShineAuth::getGuard(); - if(empty($request->bearerToken())) { + if (empty($request->bearerToken())) { $this->unauthenticated($request, [$guard, ...$guards]); } diff --git a/src/JWT.php b/src/JWT.php index 1a2e515..c3c5ae2 100644 --- a/src/JWT.php +++ b/src/JWT.php @@ -49,11 +49,11 @@ public function parse(string $token): string ) ); - if(! $configuration->validator()->validate($parsedToken, ...$configuration->validationConstraints())) { + if (! $configuration->validator()->validate($parsedToken, ...$configuration->validationConstraints())) { throw new JWTValidatorException('Validation failed'); } - if($parsedToken->isExpired(now())) { + if ($parsedToken->isExpired(now())) { throw new JWTExpiredException('Token is expired'); }