@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | $prop = ''; |
| 102 | 102 | if (property_exists($appData, 'oid')) { |
| 103 | 103 | $prop = 'oid'; |
| 104 | - } else if(property_exists($appData, 'azp')) { |
|
| 104 | + } else if (property_exists($appData, 'azp')) { |
|
| 105 | 105 | $prop = 'azp'; |
| 106 | 106 | } else { |
| 107 | 107 | throw new \Exception('Token data was valid but did not contain a known property to use for subject/caller'); |
@@ -161,16 +161,16 @@ discard block |
||
| 161 | 161 | // Unpack our jwt to verify it is correctly formed |
| 162 | 162 | $token = $this->unpackJwt($accessToken); |
| 163 | 163 | // app tokens must be signed in RSA |
| 164 | - if (! isset($token['header']['alg']) || $token['header']['alg'] != 'RS256') { |
|
| 164 | + if (!isset($token['header']['alg']) || $token['header']['alg'] != 'RS256') { |
|
| 165 | 165 | throw new \Exception('Token is not using the correct signing algorithm RS256 '.$accessToken); |
| 166 | 166 | } |
| 167 | 167 | // app tokens are RSA signed with a key ID in the header of the token |
| 168 | - if (! isset($token['header']['kid'])) { |
|
| 168 | + if (!isset($token['header']['kid'])) { |
|
| 169 | 169 | throw new \Exception('Token with unknown RSA key id can not be validated '.$accessToken); |
| 170 | 170 | } |
| 171 | 171 | // Make sure the key id is known to our azure ad information |
| 172 | 172 | $kid = $token['header']['kid']; |
| 173 | - if (! isset($this->azureActiveDirectory->signingKeys[$kid])) { |
|
| 173 | + if (!isset($this->azureActiveDirectory->signingKeys[$kid])) { |
|
| 174 | 174 | throw new \Exception('Token signed with unknown KID '.$kid); |
| 175 | 175 | } |
| 176 | 176 | // get the x509 encoded cert body |
@@ -247,7 +247,7 @@ discard block |
||
| 247 | 247 | $roles = $user->roles()->get()->all(); |
| 248 | 248 | foreach ($roles as $key => $role) { |
| 249 | 249 | $role->permissions = $role->abilities()->get()->all(); |
| 250 | - if (! count($role->permissions)) { |
|
| 250 | + if (!count($role->permissions)) { |
|
| 251 | 251 | unset($roles[$key]); |
| 252 | 252 | } |
| 253 | 253 | } |