|
@@ -169,7 +169,7 @@ discard block |
|
|
block discarded – undo |
|
169
|
169
|
base64_decode($request->request->get('client_data_raw')), |
|
170
|
170
|
$oneToken[0], |
|
171
|
171
|
$oneToken[1], |
|
172
|
|
- (int)$oneToken[4], // algo |
|
|
172
|
+ (int) $oneToken[4], // algo |
|
173
|
173
|
base64_decode($request->request->get('signature')), |
|
174
|
174
|
$debugEnabled |
|
175
|
175
|
); |
|
@@ -227,7 +227,7 @@ discard block |
|
|
block discarded – undo |
|
227
|
227
|
|
|
228
|
228
|
if ($debugEnabled) { |
|
229
|
229
|
$response = new RunnableResponse( |
|
230
|
|
- function (WebAuthnAuthenticationEvent $authObject, array $state) { |
|
|
230
|
+ function(WebAuthnAuthenticationEvent $authObject, array $state) { |
|
231
|
231
|
echo $authObject->getDebugBuffer(); |
|
232
|
232
|
echo $authObject->getValidateBuffer(); |
|
233
|
233
|
echo "Debug mode, not continuing to " . ($state['FIDO2WantsRegister'] ? "credential registration page." : "destination."); |
|
@@ -251,7 +251,7 @@ discard block |
|
|
block discarded – undo |
|
251
|
251
|
* In passwordless, we're on our own. The one thing we know is the |
|
252
|
252
|
* username. |
|
253
|
253
|
*/ |
|
254
|
|
- $state['Attributes'][$state['FIDO2AttributeStoringUsername']] = [ $state['FIDO2Username'] ]; |
|
|
254
|
+ $state['Attributes'][$state['FIDO2AttributeStoringUsername']] = [$state['FIDO2Username']]; |
|
255
|
255
|
// in case this authentication happened in the Supercharged context |
|
256
|
256
|
// it may be that there is an authprocfilter for WebAuthN, too. |
|
257
|
257
|
|
|
@@ -269,14 +269,14 @@ discard block |
|
|
block discarded – undo |
|
269
|
269
|
} |
|
270
|
270
|
// set an internal "authenticated passwordless" hint somewhere else |
|
271
|
271
|
// in $state, which the authproc can react upon |
|
272
|
|
- $state['Attributes']['internal:FIDO2PasswordlessAuthentication'] = [ $state['FIDO2Username'] ]; |
|
|
272
|
+ $state['Attributes']['internal:FIDO2PasswordlessAuthentication'] = [$state['FIDO2Username']]; |
|
273
|
273
|
|
|
274
|
274
|
$this->authState::saveState($state, 'webauthn:request'); |
|
275
|
275
|
|
|
276
|
276
|
// set a cookie to remember that the user has successfully used |
|
277
|
277
|
// Passwordless - on the Supercharged AuthSource, this can be used |
|
278
|
278
|
// to auto-trigger the FIDO2 authentication step next time |
|
279
|
|
- setcookie("SuccessfullyUsedPasswordlessBefore", "YES", time() + (3600 * 24 * 90), '/', "", true, true ); |
|
|
279
|
+ setcookie("SuccessfullyUsedPasswordlessBefore", "YES", time() + (3600 * 24 * 90), '/', "", true, true); |
|
280
|
280
|
|
|
281
|
281
|
// now properly return our final state to the framework |
|
282
|
282
|
Source::completeAuth($state); |