Skip to content

Commit

Permalink
Update AuthenticationController.php
Browse files Browse the repository at this point in the history
  • Loading branch information
joetannenbaum committed Feb 17, 2023
1 parent a20c79a commit 26821d7
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions app/Http/Controllers/AuthenticationController.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,24 +131,16 @@ public function verify(Request $request, ServerRequestInterface $serverRequest)
AttestationObjectLoader::create($attestationManager)
);

\Log::info($request->all());

$publicKeyCredential = $pkCredentialLoader->load(json_encode($request->all()));

$authenticatorAssertionResponse = $publicKeyCredential->getResponse();

\Log::info($authenticatorAssertionResponse->getClientDataJSON()->all());

if (!$authenticatorAssertionResponse instanceof AuthenticatorAssertionResponse) {
throw ValidationException::withMessages([
'username' => 'Invalid response type',
]);
}

\Log::info($authenticatorAssertionResponse->getUserHandle());

\Log::info(session(self::CREDENTIAL_REQUEST_OPTIONS_SESSION_KEY));

// Check the response from the device, this will
// throw an exception if the response is invalid.
// For the purposes of this demo, we are letting
Expand All @@ -164,9 +156,6 @@ public function verify(Request $request, ServerRequestInterface $serverRequest)
$authenticatorAssertionResponse->getUserHandle(),
);

\Log::info($publicKeyCredentialSource->jsonSerialize());
\Log::info($publicKeyCredentialSource->getUserHandle());

// If we've gotten this far, the response is valid!

// We don't need the options anymore, so let's remove them from the session
Expand Down

0 comments on commit 26821d7

Please sign in to comment.