Passed
Push — master ( 31819a...3f3337 )
by Tim
02:30
created
tests/src/Controller/ManageTokenTest.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -93,8 +93,8 @@  discard block
 block discarded – undo
93 93
             public static function loadState(string $id, string $stage, bool $allowMissing = false): ?array
94 94
             {
95 95
                 return [
96
-			'FIDO2AuthSuccessful' => true,
97
-			'FIDO2PasswordlessAuthMode' => false,
96
+            'FIDO2AuthSuccessful' => true,
97
+            'FIDO2PasswordlessAuthMode' => false,
98 98
                 ];
99 99
             }
100 100
         });
@@ -154,8 +154,8 @@  discard block
 block discarded – undo
154 154
             public static function loadState(string $id, string $stage, bool $allowMissing = false): ?array
155 155
             {
156 156
                 return [
157
-			'FIDO2AuthSuccessful' => true,
158
-			'FIDO2PasswordlessAuthMode' => false,
157
+            'FIDO2AuthSuccessful' => true,
158
+            'FIDO2PasswordlessAuthMode' => false,
159 159
                 ];
160 160
             }
161 161
         });
@@ -189,8 +189,8 @@  discard block
 block discarded – undo
189 189
                     'FIDO2AuthSuccessful' => false,
190 190
                     'FIDO2Tokens' => [0 => "foo"],
191 191
                     'FIDO2WantsRegister' => false,
192
-		    'UseInflowRegistration' => false,
193
-		    'FIDO2PasswordlessAuthMode' => false,
192
+            'UseInflowRegistration' => false,
193
+            'FIDO2PasswordlessAuthMode' => false,
194 194
                 ];
195 195
             }
196 196
         });
Please login to merge, or discard this patch.
tests/src/Controller/AuthProcessTest.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -85,8 +85,8 @@
 block discarded – undo
85 85
                     'FIDO2Scope' => 'Ducktown',
86 86
                     'FIDO2Tokens' => [],
87 87
                     'FIDO2SignupChallenge' => 'abc123',
88
-		    'FIDO2AuthSuccessful' => true,
89
-		    'FIDO2PasswordlessAuthMode' => false,
88
+            'FIDO2AuthSuccessful' => true,
89
+            'FIDO2PasswordlessAuthMode' => false,
90 90
                     'requestTokenModel' => 'something',
91 91
                 ];
92 92
             }
Please login to merge, or discard this patch.
tests/src/Controller/WebAuthnTest.php 1 patch
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -53,11 +53,11 @@  discard block
 block discarded – undo
53 53
             'simplesaml'
54 54
         );
55 55
 
56
-	$this->module_config = [];
57
-	$this->module_config = Configuration::loadFromArray(
58
-		[
59
-			'registration' => ['use_inflow_registration' => true],
60
-		]);
56
+    $this->module_config = [];
57
+    $this->module_config = Configuration::loadFromArray(
58
+        [
59
+            'registration' => ['use_inflow_registration' => true],
60
+        ]);
61 61
 
62 62
         $this->session = Session::getSessionFromRequest();
63 63
 
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
             {
67 67
                 // do nothing
68 68
             }
69
-	};
69
+    };
70 70
         Configuration::setPreLoadedConfig($this->config, 'config.php');
71 71
         Configuration::setPreLoadedConfig($this->module_config, 'module_webauthn.php');
72 72
     }
@@ -96,11 +96,11 @@  discard block
 block discarded – undo
96 96
                     'FIDO2Scope' => 'Ducktown',
97 97
                     'FIDO2Tokens' => [0 => 'A1B2C3', 1 => 'D4E5F6'],
98 98
                     'FIDO2SignupChallenge' => 'A1B2C3',
99
-		    'FIDO2WantsRegister' => false,
100
-		    'FIDO2PasswordlessAuthMode' => false,
99
+            'FIDO2WantsRegister' => false,
100
+            'FIDO2PasswordlessAuthMode' => false,
101 101
                     'FIDO2AuthSuccessful' => false,
102
-		    'requestTokenModel' => 'something',
103
-		    'Source' => 'There is no real auth source in this test.',
102
+            'requestTokenModel' => 'something',
103
+            'Source' => 'There is no real auth source in this test.',
104 104
                 ];
105 105
             }
106 106
         });
Please login to merge, or discard this patch.
src/Controller/WebAuthn.php 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -109,7 +109,7 @@  discard block
 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
         }
@@ -213,8 +213,8 @@  discard block
 block discarded – undo
213 213
         $t->data['showExitButton'] = !array_key_exists('Registration', $state);
214 214
         $frontendData['usernameEncoded'] = $usernameEncoded;
215 215
         $frontendData['attestation'] = $state['requestTokenModel'] ? "indirect" : "none";
216
-	$frontendData['credentialIdEncoded'] = $credentialIdEncoded;
217
-	$frontendData['FIDO2PasswordlessAuthMode'] = $state['FIDO2PasswordlessAuthMode'];
216
+    $frontendData['credentialIdEncoded'] = $credentialIdEncoded;
217
+    $frontendData['FIDO2PasswordlessAuthMode'] = $state['FIDO2PasswordlessAuthMode'];
218 218
         $t->data['frontendData'] = json_encode($frontendData);
219 219
 
220 220
         $t->data['FIDO2AuthSuccessful'] = $state['FIDO2AuthSuccessful'];
Please login to merge, or discard this 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 (['Source', 'FIDO2Scope','FIDO2Username','FIDO2Displayname','requestTokenModel'] as $stateItem) {
209
+        foreach (['Source', '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.