Passed
Push — master ( efb165...16a0e8 )
by Stefan
02:50
created
src/Auth/Source/Passwordless.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@
 block discarded – undo
45 45
                         $config,
46 46
                         'authsources[' . var_export($this->authId, true) . ']'
47 47
         );
48
-        $this->authnContextClassRef = $this->authSourceConfig->getOptionalString("authncontextclassref",'urn:rsa:names:tc:SAML:2.0:ac:classes:FIDO');
48
+        $this->authnContextClassRef = $this->authSourceConfig->getOptionalString("authncontextclassref", 'urn:rsa:names:tc:SAML:2.0:ac:classes:FIDO');
49 49
         $moduleConfig = Configuration::getOptionalConfig('module_webauthn.php')->toArray();
50 50
 
51 51
         $initialStateData = new StateData();
Please login to merge, or discard this patch.
src/Controller/AuthProcess.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -209,7 +209,7 @@  discard block
 block discarded – undo
209 209
 
210 210
         if ($debugEnabled) {
211 211
             $response = new RunnableResponse(
212
-                    function (WebAuthnAuthenticationEvent $authObject, array $state) {
212
+                    function(WebAuthnAuthenticationEvent $authObject, array $state) {
213 213
                         echo $authObject->getDebugBuffer();
214 214
                         echo $authObject->getValidateBuffer();
215 215
                         echo "Debug mode, not continuing to " . ($state['FIDO2WantsRegister'] ? "credential registration page." : "destination.");
@@ -233,7 +233,7 @@  discard block
 block discarded – undo
233 233
              * In passwordless, we're on our own. The one thing we know is the
234 234
              * username.
235 235
              */
236
-            $state['Attributes'][$state['FIDO2AttributeStoringUsername']] = [ $state['FIDO2Username'] ];
236
+            $state['Attributes'][$state['FIDO2AttributeStoringUsername']] = [$state['FIDO2Username']];
237 237
             // now properly return our final state to the framework
238 238
             Source::completeAuth($state);
239 239
         }
Please login to merge, or discard this patch.
src/Controller/RegProcess.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
 
178 178
         // did we get any client extensions?
179 179
         $isResidentKey = 0;
180
-        if (strlen($request->request->get('clientext')) > 0 && count(json_decode($request->request->get('clientext'), true)) > 0 ) {
180
+        if (strlen($request->request->get('clientext')) > 0 && count(json_decode($request->request->get('clientext'), true)) > 0) {
181 181
             $extensions = json_decode($request->request->get('clientext'), true);
182 182
             if ($extensions['credProps']['rk'] === true) {
183 183
                 $isResidentKey = 1;
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
         $id = $this->authState::saveState($state, 'webauthn:request');
217 217
         if ($debugEnabled === true) {
218 218
             $response = new RunnableResponse(
219
-                function (WebAuthnRegistrationEvent $regObject, string $id) {
219
+                function(WebAuthnRegistrationEvent $regObject, string $id) {
220 220
                     echo $regObject->getDebugBuffer();
221 221
                     echo $regObject->getValidateBuffer();
222 222
                     echo "<form id='regform' method='POST' action='" .
Please login to merge, or discard this patch.
src/Controller/WebAuthn.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
 
167 167
         $state = $this->authState::loadState($stateId, 'webauthn:request');
168 168
 
169
-        if ( $this->workflowStateMachine($state) != self::STATE_AUTH_NOMGMT ) {
169
+        if ($this->workflowStateMachine($state) != self::STATE_AUTH_NOMGMT) {
170 170
             $templateFile = 'webauthn:webauthn.twig';
171 171
         } else {
172 172
             $templateFile = 'webauthn:authentication.twig';
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
         $frontendData = [];
207 207
         $frontendData['challengeEncoded'] = $challengeEncoded;
208 208
         $frontendData['state'] = [];
209
-        foreach (['FIDO2Scope','FIDO2Username','FIDO2Displayname','requestTokenModel'] as $stateItem) {
209
+        foreach (['FIDO2Scope', 'FIDO2Username', 'FIDO2Displayname', 'requestTokenModel'] as $stateItem) {
210 210
             $frontendData['state'][$stateItem] = $state[$stateItem];
211 211
         }
212 212
 
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
         $t->data['frontendData'] = json_encode($frontendData);
219 219
 
220 220
         $t->data['FIDO2AuthSuccessful'] = $state['FIDO2AuthSuccessful'];
221
-        if ( $this->workflowStateMachine($state) == self::STATE_MGMT ) {
221
+        if ($this->workflowStateMachine($state) == self::STATE_MGMT) {
222 222
             $t->data['regURL'] = Module::getModuleURL('webauthn/regprocess?StateId=' . urlencode($stateId));
223 223
             $t->data['delURL'] = Module::getModuleURL('webauthn/managetoken?StateId=' . urlencode($stateId));
224 224
 
Please login to merge, or discard this patch.
config-templates/module_webauthn.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@
 block discarded – undo
76 76
          * exception.
77 77
          * 
78 78
          */
79
-        'aaguid_whitelist' => [ ],
79
+        'aaguid_whitelist' => [],
80 80
         
81 81
         /*
82 82
          * Some authenticators are more equal than others. Apple TouchID and
Please login to merge, or discard this patch.