@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | $type = 'unknown'; |
73 | 73 | |
74 | 74 | // If the token is for the graph API |
75 | - if (isset($token['payload']['aud']) && $token['payload']['aud']== 'https://graph.microsoft.com') { |
|
75 | + if (isset($token['payload']['aud']) && $token['payload']['aud'] == 'https://graph.microsoft.com') { |
|
76 | 76 | // and its a user |
77 | 77 | if (isset($token['payload']['name']) && isset($token['payload']['upn'])) { |
78 | 78 | $type = 'graphuser'; |
@@ -153,16 +153,16 @@ discard block |
||
153 | 153 | // Unpack our jwt to verify it is correctly formed |
154 | 154 | $token = $this->unpackJwt($accessToken); |
155 | 155 | // app tokens must be signed in RSA |
156 | - if (! isset($token['header']['alg']) || $token['header']['alg'] != 'RS256') { |
|
156 | + if (!isset($token['header']['alg']) || $token['header']['alg'] != 'RS256') { |
|
157 | 157 | throw new \Exception('Token is not using the correct signing algorithm RS256 '.$accessToken); |
158 | 158 | } |
159 | 159 | // app tokens are RSA signed with a key ID in the header of the token |
160 | - if (! isset($token['header']['kid'])) { |
|
160 | + if (!isset($token['header']['kid'])) { |
|
161 | 161 | throw new \Exception('Token with unknown RSA key id can not be validated '.$accessToken); |
162 | 162 | } |
163 | 163 | // Make sure the key id is known to our azure ad information |
164 | 164 | $kid = $token['header']['kid']; |
165 | - if (! isset($this->azureActiveDirectory->signingKeys[$kid])) { |
|
165 | + if (!isset($this->azureActiveDirectory->signingKeys[$kid])) { |
|
166 | 166 | throw new \Exception('Token signed with unknown KID '.$kid); |
167 | 167 | } |
168 | 168 | // get the x509 encoded cert body |
@@ -239,7 +239,7 @@ discard block |
||
239 | 239 | $roles = $user->roles()->get()->all(); |
240 | 240 | foreach ($roles as $key => $role) { |
241 | 241 | $role->permissions = $role->abilities()->get()->all(); |
242 | - if (! count($role->permissions)) { |
|
242 | + if (!count($role->permissions)) { |
|
243 | 243 | unset($roles[$key]); |
244 | 244 | } |
245 | 245 | } |