@@ -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_jwtkeys_table.php'); |
103 | 103 | })->push($this->app->databasePath()."/migrations/{$timestamp}_create_jwtkeys_table.php") |
104 | 104 | ->first(); |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | private static function verifyToken(string $jwt, string $uri, bool $jwk = false) |
104 | 104 | { |
105 | 105 | $kid = self::getKid($jwt); |
106 | - if (! $kid) { |
|
106 | + if (!$kid) { |
|
107 | 107 | throw authException::auth(422, 'Malformed JWT'); |
108 | 108 | } |
109 | 109 | if (config('jwtAuthRoles.cache.enabled')) { |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | } |
114 | 114 | |
115 | 115 | $publicKey = $row->key ?? $jwk ? self::getJwk($kid, $uri) : self::getPem($kid, $uri); |
116 | - if (! isset($publicKey) || ! $publicKey) { |
|
116 | + if (!isset($publicKey) || !$publicKey) { |
|
117 | 117 | throw authException::auth(500, 'Unable to validate JWT'); |
118 | 118 | } |
119 | 119 | |
@@ -146,7 +146,7 @@ discard block |
||
146 | 146 | if (config('jwtAuthRoles.autoCreateRoles')) { |
147 | 147 | foreach ($claims->roles as $role) { |
148 | 148 | $db_role = Role::where('name', $role)->first(); |
149 | - if (! $db_role) { |
|
149 | + if (!$db_role) { |
|
150 | 150 | Role::create(['name' => $role]); |
151 | 151 | } |
152 | 152 | } |