[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/libraries/vendor/web-auth/webauthn-lib/src/AttestationStatement/ -> NoneAttestationStatementSupport.php (source)

   1  <?php
   2  
   3  declare(strict_types=1);
   4  
   5  /*
   6   * The MIT License (MIT)
   7   *
   8   * Copyright (c) 2014-2019 Spomky-Labs
   9   *
  10   * This software may be modified and distributed under the terms
  11   * of the MIT license.  See the LICENSE file for details.
  12   */
  13  
  14  namespace Webauthn\AttestationStatement;
  15  
  16  use Assert\Assertion;
  17  use Webauthn\AuthenticatorData;
  18  use Webauthn\TrustPath\EmptyTrustPath;
  19  
  20  final class NoneAttestationStatementSupport implements AttestationStatementSupport
  21  {
  22      public function name(): string
  23      {
  24          return 'none';
  25      }
  26  
  27      public function load(array $attestation): AttestationStatement
  28      {
  29          Assertion::noContent($attestation['attStmt'], 'Invalid attestation object');
  30  
  31          return AttestationStatement::createNone($attestation['fmt'], $attestation['attStmt'], new EmptyTrustPath());
  32      }
  33  
  34      public function isValid(string $clientDataJSONHash, AttestationStatement $attestationStatement, AuthenticatorData $authenticatorData): bool
  35      {
  36          return 0 === \count($attestationStatement->getAttStmt());
  37      }
  38  }


Generated: Wed Sep 7 05:41:13 2022 Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer