Passed
Push — master ( c97f9b...6f2222 )
by meta
08:41 queued 06:23
created
src/Controllers/AuthController.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/Controllers/WebAuthController.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
     public function redirectToOauthAdminConsent(\Illuminate\Http\Request $request)
42 42
     {
43 43
         $url = $this->azureActiveDirectory->buildAdminConsentUrl(config('enterpriseauth.credentials.client_id'),
44
-                                                                 config('enterpriseauth.credentials.callback_url'));
44
+                                                                    config('enterpriseauth.credentials.callback_url'));
45 45
         //return new \Illuminate\Http\RedirectResponse($url);
46 46
         return redirect($url);
47 47
     }
@@ -58,8 +58,8 @@  discard block
 block discarded – undo
58 58
     public function buildAuthUrl()
59 59
     {
60 60
         $url = $this->azureActiveDirectory->authorizationEndpoint
61
-             .'?'
62
-             .$this->buildAuthUrlQueryString();
61
+                .'?'
62
+                .$this->buildAuthUrlQueryString();
63 63
 
64 64
         return $url;
65 65
     }
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
 
102 102
         // Check to see if there is an intended destination url saved
103 103
         $destination = $request->session()
104
-                               ->get('oauthIntendedUrl');
104
+                                ->get('oauthIntendedUrl');
105 105
         // If there is no intended destination url, use the default
106 106
         if (! $destination) {
107 107
             $destination = config('enterpriseauth.redirect_on_login');
Please login to merge, or discard this patch.