@@ -414,7 +414,7 @@ |
||
414 | 414 | $keyObject = new Ec2Key($this->cborDecode(hex2bin($this->credential))); |
415 | 415 | $keyResource = openssl_pkey_get_public($keyObject->asPEM()); |
416 | 416 | if ($keyResource === false) { |
417 | - $this->fail("Unable to construct ECDSA public key resource from PEM."); |
|
417 | + $this->fail("Unable to construct ECDSA public key resource from PEM."); |
|
418 | 418 | }; |
419 | 419 | break; |
420 | 420 | case self::PK_ALGORITHM_RSA: |
@@ -182,7 +182,7 @@ |
||
182 | 182 | return $this->credential; |
183 | 183 | } |
184 | 184 | |
185 | - /** |
|
185 | + /** |
|
186 | 186 | * @return int |
187 | 187 | */ |
188 | 188 | public function getAlgo(): int |
@@ -216,7 +216,7 @@ |
||
216 | 216 | $this->db->write( |
217 | 217 | 'INSERT INTO credentials ' . |
218 | 218 | '(user_id, credentialId, credential, algo, presenceLevel, isResidentKey, signCounter, friendlyName, hashedId) VALUES ' |
219 | - . '(:userId,:credentialId,:credential,:algo,:presenceLevel,:isResidentKey,:signCounter,:friendlyName,:hashedId)', |
|
219 | + . '(:userId,:credentialId,:credential,:algo,:presenceLevel,:isResidentKey,:signCounter,:friendlyName,:hashedId)', |
|
220 | 220 | [ |
221 | 221 | 'userId' => $userId, |
222 | 222 | 'credentialId' => $credentialId, |
@@ -93,8 +93,8 @@ discard block |
||
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 |
||
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 |
||
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 | }); |
@@ -85,8 +85,8 @@ |
||
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 | } |
@@ -53,11 +53,11 @@ discard block |
||
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 |
||
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 |
||
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 | }); |
@@ -109,7 +109,7 @@ discard block |
||
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 |
||
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']; |