Skip to content

Commit

Permalink
feat: add more attestation statements and public-key algorithms, fix #3
Browse files Browse the repository at this point in the history
  • Loading branch information
shaokeyibb committed Nov 26, 2023
1 parent dc02468 commit 272832a
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions extend.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,34 @@

use Cose\Algorithm\Manager;
use Cose\Algorithm\Signature\ECDSA\ES256;
use Cose\Algorithm\Signature\RSA\RS256;
use Flarum\Extend;
use Illuminate\Container\Container;
use Lcobucci\Clock\SystemClock;
use Webauthn\AttestationStatement\AndroidKeyAttestationStatementSupport;
use Webauthn\AttestationStatement\AppleAttestationStatementSupport;
use Webauthn\AttestationStatement\AttestationObjectLoader;
use Webauthn\AttestationStatement\AttestationStatementSupportManager;
use Webauthn\AttestationStatement\FidoU2FAttestationStatementSupport;
use Webauthn\AttestationStatement\NoneAttestationStatementSupport;
use Webauthn\AttestationStatement\PackedAttestationStatementSupport;
use Webauthn\AttestationStatement\TPMAttestationStatementSupport;
use Webauthn\AuthenticationExtensions\ExtensionOutputCheckerHandler;
use Webauthn\AuthenticatorAssertionResponseValidator;
use Webauthn\AuthenticatorAttestationResponseValidator;
use Webauthn\PublicKeyCredentialLoader;

$algorithmManager = Manager::create();
$algorithmManager->add(new ES256());
$algorithmManager->add(new RS256());

$attestationStatementSupportManager = AttestationStatementSupportManager::create();
$attestationStatementSupportManager->add(new NoneAttestationStatementSupport());
$attestationStatementSupportManager->add(new PackedAttestationStatementSupport($algorithmManager));
$attestationStatementSupportManager->add(new FidoU2FAttestationStatementSupport());
$attestationStatementSupportManager->add(new TPMAttestationStatementSupport(SystemClock::fromSystemTimezone()));
$attestationStatementSupportManager->add(new AppleAttestationStatementSupport());
$attestationStatementSupportManager->add(new AndroidKeyAttestationStatementSupport());

$extensionOutputCheckerHandler = ExtensionOutputCheckerHandler::create();

Expand Down

0 comments on commit 272832a

Please sign in to comment.