@@ -202,7 +202,7 @@ |
||
202 | 202 | 'private' => false, |
203 | 203 | ]); |
204 | 204 | $response->setExpires(new DateTime('Thu, 19 Nov 1981 08:52:00 GMT')); |
205 | - */ |
|
205 | + */ |
|
206 | 206 | |
207 | 207 | return $response; |
208 | 208 | } |
@@ -176,7 +176,7 @@ |
||
176 | 176 | |
177 | 177 | if ($debugEnabled) { |
178 | 178 | $response = new RunnableResponse( |
179 | - function (WebAuthnAuthenticationEvent $authObject, array $state) { |
|
179 | + function(WebAuthnAuthenticationEvent $authObject, array $state) { |
|
180 | 180 | echo $authObject->getDebugBuffer(); |
181 | 181 | echo $authObject->getValidateBuffer(); |
182 | 182 | echo "Debug mode, not continuing to " . ($state['FIDO2WantsRegister'] ? "credential registration page." : "destination."); |
@@ -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: |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | */ |
25 | 25 | public const PK_ALGORITHM_ECDSA = "-7"; |
26 | 26 | public const PK_ALGORITHM_RSA = "-257"; |
27 | - public const PK_ALGORITHM = [ self::PK_ALGORITHM_ECDSA, self::PK_ALGORITHM_RSA ]; |
|
27 | + public const PK_ALGORITHM = [self::PK_ALGORITHM_ECDSA, self::PK_ALGORITHM_RSA]; |
|
28 | 28 | public const AAGUID_ASSURANCE_LEVEL_NONE = 0; |
29 | 29 | public const AAGUID_ASSURANCE_LEVEL_SELF = 1; |
30 | 30 | public const AAGUID_ASSURANCE_LEVEL_BASIC = 2; |
@@ -263,7 +263,7 @@ discard block |
||
263 | 263 | $keyDetails = openssl_pkey_get_details($keyResource); |
264 | 264 | if ( |
265 | 265 | $credentialDetails['bits'] != $keyDetails['bits'] || |
266 | - $credentialDetails['key'] != $keyDetails['key'] || |
|
266 | + $credentialDetails['key'] != $keyDetails['key'] || |
|
267 | 267 | $credentialDetails['type'] != $keyDetails['type'] |
268 | 268 | ) { |
269 | 269 | $this->fail( |
@@ -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 |
@@ -196,7 +196,7 @@ |
||
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='" . |
@@ -105,7 +105,7 @@ |
||
105 | 105 | } |
106 | 106 | return self::STATE_AUTH_ALLOWMGMT; |
107 | 107 | } else { // in inflow, allow to check the management box; otherwise, |
108 | - // only auth |
|
108 | + // only auth |
|
109 | 109 | return $state['UseInflowRegistration'] ? self::STATE_AUTH_ALLOWMGMT : self::STATE_AUTH_NOMGMT; |
110 | 110 | } |
111 | 111 | } |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | |
126 | 126 | $state = $this->authState::loadState($stateId, 'webauthn:request'); |
127 | 127 | |
128 | - if ( $this->workflowStateMachine($state) != self::STATE_AUTH_NOMGMT ) { |
|
128 | + if ($this->workflowStateMachine($state) != self::STATE_AUTH_NOMGMT) { |
|
129 | 129 | $templateFile = 'webauthn:webauthn.twig'; |
130 | 130 | } else { |
131 | 131 | $templateFile = 'webauthn:authentication.twig'; |
@@ -166,7 +166,7 @@ discard block |
||
166 | 166 | $frontendData = []; |
167 | 167 | $frontendData['challengeEncoded'] = $challengeEncoded; |
168 | 168 | $frontendData['state'] = []; |
169 | - foreach (['Source', 'FIDO2Scope','FIDO2Username','FIDO2Displayname','requestTokenModel'] as $stateItem) { |
|
169 | + foreach (['Source', 'FIDO2Scope', 'FIDO2Username', 'FIDO2Displayname', 'requestTokenModel'] as $stateItem) { |
|
170 | 170 | $frontendData['state'][$stateItem] = $state[$stateItem]; |
171 | 171 | } |
172 | 172 | |
@@ -177,7 +177,7 @@ discard block |
||
177 | 177 | $t->data['frontendData'] = json_encode($frontendData); |
178 | 178 | |
179 | 179 | $t->data['FIDO2AuthSuccessful'] = $state['FIDO2AuthSuccessful']; |
180 | - if ( $this->workflowStateMachine($state) == self::STATE_MGMT ) { |
|
180 | + if ($this->workflowStateMachine($state) == self::STATE_MGMT) { |
|
181 | 181 | $t->data['regURL'] = Module::getModuleURL('webauthn/regprocess?StateId=' . urlencode($stateId)); |
182 | 182 | $t->data['delURL'] = Module::getModuleURL('webauthn/managetoken?StateId=' . urlencode($stateId)); |
183 | 183 |