@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | $this->mergeConfigFrom(__DIR__.'/../config/jwtauthroles.php', 'jwtauthroles'); |
| 42 | 42 | |
| 43 | 43 | // Register the service the package provides. |
| 44 | - $this->app->singleton('JwtAuthRoles', function ($app) { |
|
| 44 | + $this->app->singleton('JwtAuthRoles', function($app) { |
|
| 45 | 45 | return new JwtAuthRoles; |
| 46 | 46 | }); |
| 47 | 47 | } |
@@ -98,7 +98,7 @@ discard block |
||
| 98 | 98 | $timestamp = date('Y_m_d_His'); |
| 99 | 99 | |
| 100 | 100 | return Collection::make($this->app->databasePath().DIRECTORY_SEPARATOR.'migrations'.DIRECTORY_SEPARATOR) |
| 101 | - ->flatMap(function ($path) use ($filesystem) { |
|
| 101 | + ->flatMap(function($path) use ($filesystem) { |
|
| 102 | 102 | return $filesystem->glob($path.'*_create_jwtauth_tables.php'); |
| 103 | 103 | })->push($this->app->databasePath()."/migrations/{$timestamp}_create_jwtauth_tables.php") |
| 104 | 104 | ->first(); |
@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | $this->mergeConfigFrom(__DIR__.'/../config/jwtauthroles.php', 'jwtauthroles'); |
| 42 | 42 | |
| 43 | 43 | // Register the service the package provides. |
| 44 | - $this->app->singleton('JwtAuthRoles', function ($app) { |
|
| 44 | + $this->app->singleton('JwtAuthRoles', function($app) { |
|
| 45 | 45 | return new JwtAuthRoles; |
| 46 | 46 | }); |
| 47 | 47 | } |
@@ -98,7 +98,7 @@ discard block |
||
| 98 | 98 | $timestamp = date('Y_m_d_His'); |
| 99 | 99 | |
| 100 | 100 | return Collection::make($this->app->databasePath().DIRECTORY_SEPARATOR.'migrations'.DIRECTORY_SEPARATOR) |
| 101 | - ->flatMap(function ($path) use ($filesystem) { |
|
| 101 | + ->flatMap(function($path) use ($filesystem) { |
|
| 102 | 102 | return $filesystem->glob($path.'*_create_jwtauth_tables.php'); |
| 103 | 103 | })->push($this->app->databasePath()."/migrations/{$timestamp}_create_jwtauth_tables.php") |
| 104 | 104 | ->first(); |
@@ -99,7 +99,7 @@ discard block |
||
| 99 | 99 | private static function verifyToken(string $jwt, string $uri, bool $jwk = false): object |
| 100 | 100 | { |
| 101 | 101 | $kid = self::getKid($jwt); |
| 102 | - if (! $kid) { |
|
| 102 | + if (!$kid) { |
|
| 103 | 103 | throw AuthException::auth(422, 'Malformed JWT'); |
| 104 | 104 | } |
| 105 | 105 | if (config('jwtauthroles.cache.enabled')) { |
@@ -115,7 +115,7 @@ discard block |
||
| 115 | 115 | ? self::getJwk($kid, $uri) |
| 116 | 116 | : self::getPem($kid, $uri); |
| 117 | 117 | |
| 118 | - if (! isset($publicKey) || ! $publicKey) { |
|
| 118 | + if (!isset($publicKey) || !$publicKey) { |
|
| 119 | 119 | throw AuthException::auth(500, 'Unable to validate JWT'); |
| 120 | 120 | } |
| 121 | 121 | |
@@ -137,7 +137,7 @@ discard block |
||
| 137 | 137 | ? config('jwtauthroles.jwkUri') |
| 138 | 138 | : config('jwtauthroles.pemUri'); |
| 139 | 139 | |
| 140 | - if (! config('jwtauthroles.validateJwt')) { |
|
| 140 | + if (!config('jwtauthroles.validateJwt')) { |
|
| 141 | 141 | $claims = self::getClaims($jwt); |
| 142 | 142 | } else { |
| 143 | 143 | $claims = self::verifyToken($jwt, $uri, config('jwtauthroles.useJwk')); |
@@ -99,7 +99,7 @@ discard block |
||
| 99 | 99 | private static function verifyToken(string $jwt, string $uri, bool $jwk = false): object |
| 100 | 100 | { |
| 101 | 101 | $kid = self::getKid($jwt); |
| 102 | - if (! $kid) { |
|
| 102 | + if (!$kid) { |
|
| 103 | 103 | throw AuthException::auth(422, 'Malformed JWT'); |
| 104 | 104 | } |
| 105 | 105 | if (config('jwtauthroles.cache.enabled')) { |
@@ -115,7 +115,7 @@ discard block |
||
| 115 | 115 | ? self::getJwk($kid, $uri) |
| 116 | 116 | : self::getPem($kid, $uri); |
| 117 | 117 | |
| 118 | - if (! isset($publicKey) || ! $publicKey) { |
|
| 118 | + if (!isset($publicKey) || !$publicKey) { |
|
| 119 | 119 | throw AuthException::auth(500, 'Unable to validate JWT'); |
| 120 | 120 | } |
| 121 | 121 | |
@@ -137,7 +137,7 @@ discard block |
||
| 137 | 137 | ? config('jwtauthroles.jwkUri') |
| 138 | 138 | : config('jwtauthroles.pemUri'); |
| 139 | 139 | |
| 140 | - if (! config('jwtauthroles.validateJwt')) { |
|
| 140 | + if (!config('jwtauthroles.validateJwt')) { |
|
| 141 | 141 | $claims = self::getClaims($jwt); |
| 142 | 142 | } else { |
| 143 | 143 | $claims = self::verifyToken($jwt, $uri, config('jwtauthroles.useJwk')); |