@@ -134,8 +134,8 @@ |
||
134 | 134 | } |
135 | 135 | // Get the X509 certificate for the selected key id |
136 | 136 | $certificate = '-----BEGIN CERTIFICATE-----'.PHP_EOL |
137 | - .$x5c.PHP_EOL |
|
138 | - .'-----END CERTIFICATE-----'; |
|
137 | + .$x5c.PHP_EOL |
|
138 | + .'-----END CERTIFICATE-----'; |
|
139 | 139 | // Perform the verification and get the verified payload results |
140 | 140 | $payload = \Firebase\JWT\JWT::decode($accessToken, $certificate, ['RS256']); |
141 | 141 |
@@ -121,16 +121,16 @@ discard block |
||
121 | 121 | // Unpack our jwt to verify it is correctly formed |
122 | 122 | $token = $this->unpackJwt($accessToken); |
123 | 123 | // app tokens must be signed in RSA |
124 | - if (! isset($token['header']['alg']) || $token['header']['alg'] != 'RS256') { |
|
124 | + if (!isset($token['header']['alg']) || $token['header']['alg'] != 'RS256') { |
|
125 | 125 | throw new \Exception('Token is not using the correct signing algorithm RS256 '.$accessToken); |
126 | 126 | } |
127 | 127 | // app tokens are RSA signed with a key ID in the header of the token |
128 | - if (! isset($token['header']['kid'])) { |
|
128 | + if (!isset($token['header']['kid'])) { |
|
129 | 129 | throw new \Exception('Token with unknown RSA key id can not be validated '.$accessToken); |
130 | 130 | } |
131 | 131 | // Make sure the key id is known to our azure ad information |
132 | 132 | $kid = $token['header']['kid']; |
133 | - if (! isset($this->azureActiveDirectory->signingKeys[$kid])) { |
|
133 | + if (!isset($this->azureActiveDirectory->signingKeys[$kid])) { |
|
134 | 134 | throw new \Exception('Token signed with unknown KID '.$kid); |
135 | 135 | } |
136 | 136 | // get the x509 encoded cert body |
@@ -207,7 +207,7 @@ discard block |
||
207 | 207 | $roles = $user->roles()->get()->all(); |
208 | 208 | foreach ($roles as $key => $role) { |
209 | 209 | $role->permissions = $role->abilities()->get()->all(); |
210 | - if (! count($role->permissions)) { |
|
210 | + if (!count($role->permissions)) { |
|
211 | 211 | unset($roles[$key]); |
212 | 212 | } |
213 | 213 | } |
@@ -40,7 +40,7 @@ |
||
40 | 40 | $path = $this->option('destination'); |
41 | 41 | $path = reset($path); |
42 | 42 | // otherwise use the default path |
43 | - if (! $path) { |
|
43 | + if (!$path) { |
|
44 | 44 | $path = 'ui/preload.js'; |
45 | 45 | } |
46 | 46 | // fully calculated path is APPDIR/public/ui/preload.js |