Skip to content

Commit

Permalink
adjust example
Browse files Browse the repository at this point in the history
  • Loading branch information
Firehed committed Mar 2, 2024
1 parent 2ed2d10 commit 2a54373
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion examples/getChallenge.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,14 @@

require __DIR__ . '/vendor/autoload.php';

use Firehed\WebAuthn\ExpiringChallenge;

session_start();

// Generate challenge
$challengeManager = getChallengeManager();
$challenge = $challengeManager->createChallenge();
$challenge = ExpiringChallenge::withLifetime(300);
$challengeManager->manageChallenge($challenge);

// Send to user
header('Content-type: application/json');
Expand Down

0 comments on commit 2a54373

Please sign in to comment.