| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | namespace Webauthn; |
| 6 | |
| 7 | use Symfony\Component\Uid\Uuid; |
| 8 | |
| 9 | /** |
| 10 | * @see https://www.w3.org/TR/webauthn/#sec-attested-credential-data |
| 11 | */ |
| 12 | class AttestedCredentialData |
| 13 | { |
| 14 | public function __construct( |
| 15 | public Uuid $aaguid, |
| 16 | public readonly string $credentialId, |
| 17 | public readonly ?string $credentialPublicKey |
| 18 | ) { |
| 19 | } |
| 20 | |
| 21 | public static function create(Uuid $aaguid, string $credentialId, ?string $credentialPublicKey = null): self |
| 22 | { |
| 23 | return new self($aaguid, $credentialId, $credentialPublicKey); |
| 24 | } |
| 25 | } |