Passed
Push — master ( 7d093b...8bdd8c )
by Stefan
02:21 queued 10s
created
src/WebAuthn/WebAuthnAbstractEvent.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -182,7 +182,7 @@
 block discarded – undo
182 182
         return $this->credential;
183 183
     }
184 184
 
185
-   /**
185
+    /**
186 186
      * @return int
187 187
      */
188 188
     public function getAlgo(): int
Please login to merge, or discard this patch.
src/Controller/RegProcess.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -196,7 +196,7 @@
 block discarded – undo
196 196
         $id = $this->authState::saveState($state, 'webauthn:request');
197 197
         if ($debugEnabled === true) {
198 198
             $response = new RunnableResponse(
199
-                function (WebAuthnRegistrationEvent $regObject, string $id) {
199
+                function(WebAuthnRegistrationEvent $regObject, string $id) {
200 200
                     echo $regObject->getDebugBuffer();
201 201
                     echo $regObject->getValidateBuffer();
202 202
                     echo "<form id='regform' method='POST' action='" .
Please login to merge, or discard this patch.
src/Controller/WebAuthn.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -109,7 +109,7 @@
 block discarded – undo
109 109
             }
110 110
             return self::STATE_AUTH_ALLOWMGMT;
111 111
         } else { // in inflow, allow to check the management box; otherwise,
112
-                 // only auth
112
+                    // only auth
113 113
             $moduleConfig = Configuration::getOptionalConfig('module_webauthn.php')->toArray();
114 114
             return $moduleConfig['registration']['use_inflow_registration'] ? self::STATE_AUTH_ALLOWMGMT : self::STATE_AUTH_NOMGMT;
115 115
         }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -215,7 +215,7 @@
 block discarded – undo
215 215
         $frontendData = [];
216 216
         $frontendData['challengeEncoded'] = $challengeEncoded;
217 217
         $frontendData['state'] = [];
218
-        foreach (['FIDO2Scope','FIDO2Username','FIDO2Displayname','requestTokenModel'] as $stateItem) {
218
+        foreach (['FIDO2Scope', 'FIDO2Username', 'FIDO2Displayname', 'requestTokenModel'] as $stateItem) {
219 219
             $frontendData['state'][$stateItem] = $state[$stateItem];
220 220
         }
221 221
 
Please login to merge, or discard this patch.
src/WebAuthn/WebAuthnRegistrationEvent.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -624,7 +624,7 @@
 block discarded – undo
624 624
          * STEP 13 of the validation procedure in § 7.1 of the spec: is the algorithm the expected one?
625 625
          */
626 626
         if (in_array($arrayPK['3'], self::PK_ALGORITHM)) { // we requested -7 or -257, so want to see it here
627
-            $this->algo = (int)$arrayPK['3'];
627
+            $this->algo = (int) $arrayPK['3'];
628 628
             $this->pass("Public Key Algorithm is expected (" . implode(' or ', WebAuthnRegistrationEvent::PK_ALGORITHM) . ").");
629 629
         } else {
630 630
             $this->fail("Public Key Algorithm mismatch!");
Please login to merge, or discard this patch.
src/Controller/PushbackUserPass.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -131,7 +131,7 @@
 block discarded – undo
131 131
         // this is the confirmed username, we store it just like the Passwordless
132 132
         // one would have been
133 133
         
134
-        $state['Attributes'][$state['FIDO2AttributeStoringUsername']] = [ $request->request->get("username") ];
134
+        $state['Attributes'][$state['FIDO2AttributeStoringUsername']] = [$request->request->get("username")];
135 135
 
136 136
         // we deliberately do not store any additional attributes - these have
137 137
         // to be retrieved from the same authproc that would retrieve them
Please login to merge, or discard this patch.
src/Controller/Supercharged.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -215,7 +215,7 @@
 block discarded – undo
215 215
         $frontendData = [];
216 216
         $frontendData['challengeEncoded'] = $challengeEncoded;
217 217
         $frontendData['state'] = [];
218
-        foreach (['FIDO2Scope','FIDO2Username','FIDO2Displayname','requestTokenModel'] as $stateItem) {
218
+        foreach (['FIDO2Scope', 'FIDO2Username', 'FIDO2Displayname', 'requestTokenModel'] as $stateItem) {
219 219
             $frontendData['state'][$stateItem] = $state[$stateItem];
220 220
         }
221 221
 
Please login to merge, or discard this patch.
src/Controller/AuthProcess.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
             base64_decode($request->request->get('client_data_raw')),
166 166
             $oneToken[0],
167 167
             $oneToken[1],
168
-            (int)$oneToken[4], // algo
168
+            (int) $oneToken[4], // algo
169 169
             base64_decode($request->request->get('signature')),
170 170
             $debugEnabled
171 171
         );
@@ -223,7 +223,7 @@  discard block
 block discarded – undo
223 223
 
224 224
         if ($debugEnabled) {
225 225
             $response = new RunnableResponse(
226
-                function (WebAuthnAuthenticationEvent $authObject, array $state) {
226
+                function(WebAuthnAuthenticationEvent $authObject, array $state) {
227 227
                     echo $authObject->getDebugBuffer();
228 228
                     echo $authObject->getValidateBuffer();
229 229
                     echo "Debug mode, not continuing to " . ($state['FIDO2WantsRegister'] ? "credential registration page." : "destination.");
@@ -247,7 +247,7 @@  discard block
 block discarded – undo
247 247
              * In passwordless, we're on our own. The one thing we know is the
248 248
              * username.
249 249
              */
250
-            $state['Attributes'][$state['FIDO2AttributeStoringUsername']] = [ $state['FIDO2Username'] ];
250
+            $state['Attributes'][$state['FIDO2AttributeStoringUsername']] = [$state['FIDO2Username']];
251 251
             // in case this authentication happened in the Supercharged context
252 252
             // it may be that there is an authprocfilter for WebAuthN, too.
253 253
             
@@ -260,19 +260,19 @@  discard block
 block discarded – undo
260 260
             
261 261
             foreach ($state['IdPMetadata']['authproc'] as $index => $content) {
262 262
                 if ($content['class'] == "webauthn:WebAuthn") {
263
-                    unset( $state['IdPMetadata']['authproc'][$index] );
263
+                    unset($state['IdPMetadata']['authproc'][$index]);
264 264
                 }
265 265
             }
266 266
             // set an internal "authenticated passwordless" hint somewhere else
267 267
             // in $state, which the authproc can react upon
268
-            $state['Attributes']['internal:FIDO2PasswordlessAuthentication'] = [ $state['FIDO2Username'] ];
268
+            $state['Attributes']['internal:FIDO2PasswordlessAuthentication'] = [$state['FIDO2Username']];
269 269
             
270 270
             $this->authState::saveState($state, 'webauthn:request');
271 271
             
272 272
             // set a cookie to remember that the user has successfully used
273 273
             // Passwordless - on the Supercharged AuthSource, this can be used
274 274
             // to auto-trigger the FIDO2 authentication step next time
275
-            setcookie("SuccessfullyUsedPasswordlessBefore", "YES", time()+60*60*24*90, '/', "", true, true );
275
+            setcookie("SuccessfullyUsedPasswordlessBefore", "YES", time() + 60 * 60 * 24 * 90, '/', "", true, true);
276 276
             
277 277
             // now properly return our final state to the framework
278 278
             Source::completeAuth($state);
Please login to merge, or discard this patch.