@@ -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 | \Illuminate\Support\Facades\Log::debug('graph api did not contain mail field, using userPrincipalName instead '.json_encode($userData)); |
54 | 54 | $userData['mail'] = $userData['userPrincipalName']; |
55 | 55 | } |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | // Try to find an existing user |
66 | 66 | $user = $userType::where($userIdField, $userData['id'])->first(); |
67 | 67 | // If we dont have an existing user |
68 | - if (! $user) { |
|
68 | + if (!$user) { |
|
69 | 69 | // Go create a new one with this data |
70 | 70 | $user = $this->createUserFromAzureData($userData); |
71 | 71 | } |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | |
110 | 110 | // TODO: rewrite this so that if the user doesnt exist we create them and get their groups from AAD |
111 | 111 | $user = $user_class::where('userPrincipalName', $upn)->first(); |
112 | - if (! $user) { |
|
112 | + if (!$user) { |
|
113 | 113 | throw new \Exception('No user found with user principal name '.$upn); |
114 | 114 | } |
115 | 115 | |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | public function loadClientCertFromWebserver() |
120 | 120 | { |
121 | 121 | // Make sure we got a client certificate from the web server |
122 | - if (! isset($_SERVER['SSL_CLIENT_CERT']) || ! $_SERVER['SSL_CLIENT_CERT']) { |
|
122 | + if (!isset($_SERVER['SSL_CLIENT_CERT']) || !$_SERVER['SSL_CLIENT_CERT']) { |
|
123 | 123 | throw new \Exception('TLS client certificate missing'); |
124 | 124 | } |
125 | 125 | // try to parse the certificate we got |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | public function getUserPrincipalNameFromClientCert($x509) |
135 | 135 | { |
136 | 136 | $names = $x509->getExtension('id-ce-subjectAltName'); |
137 | - if (! $names) { |
|
137 | + if (!$names) { |
|
138 | 138 | throw new \Exception('TLS client cert missing subject alternative names'); |
139 | 139 | } |
140 | 140 | // Search subject alt names for user principal name |
@@ -148,7 +148,7 @@ discard block |
||
148 | 148 | } |
149 | 149 | } |
150 | 150 | } |
151 | - if (! $upn) { |
|
151 | + if (!$upn) { |
|
152 | 152 | throw new \Exception('Could not find user principal name in TLS client cert'); |
153 | 153 | } |
154 | 154 |