@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | public function scrubMicrosoftGraphUserData($userData) |
| 50 | 50 | { |
| 51 | 51 | // Fix any stupid crap with missing or null fields |
| 52 | - if (! isset($userData['mail']) || ! $userData['mail']) { |
|
| 52 | + if (!isset($userData['mail']) || !$userData['mail']) { |
|
| 53 | 53 | $userData['mail'] = $userData['userPrincipalName']; |
| 54 | 54 | } |
| 55 | 55 | |
@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | // Try to find an existing user |
| 65 | 65 | $user = $userType::where($userIdField, $userData['id'])->first(); |
| 66 | 66 | // If we dont have an existing user |
| 67 | - if (! $user) { |
|
| 67 | + if (!$user) { |
|
| 68 | 68 | // Go create a new one with this data |
| 69 | 69 | $user = $this->createUserFromAzureData($userData); |
| 70 | 70 | } |
@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | public function certAuth() |
| 97 | 97 | { |
| 98 | 98 | // Make sure we got a client certificate from the web server |
| 99 | - if (! $_SERVER['SSL_CLIENT_CERT']) { |
|
| 99 | + if (!$_SERVER['SSL_CLIENT_CERT']) { |
|
| 100 | 100 | throw new \Exception('TLS client certificate missing'); |
| 101 | 101 | } |
| 102 | 102 | // try to parse the certificate we got |
@@ -105,7 +105,7 @@ discard block |
||
| 105 | 105 | $asciicert = str_replace("\t", '', $_SERVER['SSL_CLIENT_CERT']); |
| 106 | 106 | $x509->loadX509($asciicert); |
| 107 | 107 | $names = $x509->getExtension('id-ce-subjectAltName'); |
| 108 | - if (! $names) { |
|
| 108 | + if (!$names) { |
|
| 109 | 109 | throw new \Exception('TLS client cert missing subject alternative names'); |
| 110 | 110 | } |
| 111 | 111 | // Search subject alt names for user principal name |
@@ -119,12 +119,12 @@ discard block |
||
| 119 | 119 | } |
| 120 | 120 | } |
| 121 | 121 | } |
| 122 | - if (! $upn) { |
|
| 122 | + if (!$upn) { |
|
| 123 | 123 | throw new \Exception('Could not find user principal name in TLS client cert'); |
| 124 | 124 | } |
| 125 | 125 | $user_class = config('enterpriseauth.user_class'); |
| 126 | 126 | $user = $user_class::where('userPrincipalName', $upn)->first(); |
| 127 | - if (! $user) { |
|
| 127 | + if (!$user) { |
|
| 128 | 128 | throw new \Exception('No user found with user principal name '.$upn); |
| 129 | 129 | } |
| 130 | 130 | //dd($user); |