Файловый менеджер - Редактировать - /home/pimjdymy/public_html/safrandsi/vendor/web-auth/webauthn-lib/src/CeremonyStep/CheckAttestationFormatIsKnownAndValid.php
Назад
<?php declare(strict_types=1); namespace Webauthn\CeremonyStep; use Webauthn\AttestationStatement\AttestationStatementSupportManager; use Webauthn\AuthenticatorAssertionResponse; use Webauthn\AuthenticatorAttestationResponse; use Webauthn\Exception\AuthenticatorResponseVerificationException; use Webauthn\PublicKeyCredentialCreationOptions; use Webauthn\PublicKeyCredentialRequestOptions; use Webauthn\PublicKeyCredentialSource; final class CheckAttestationFormatIsKnownAndValid implements CeremonyStep { public function __construct( private readonly AttestationStatementSupportManager $attestationStatementSupportManager, ) { } public function process( PublicKeyCredentialSource $publicKeyCredentialSource, AuthenticatorAssertionResponse|AuthenticatorAttestationResponse $authenticatorResponse, PublicKeyCredentialRequestOptions|PublicKeyCredentialCreationOptions $publicKeyCredentialOptions, ?string $userHandle, string $host ): void { $attestationObject = $authenticatorResponse->attestationObject; if ($attestationObject === null) { return; } $fmt = $attestationObject->attStmt ->fmt; $this->attestationStatementSupportManager->has( $fmt ) || throw AuthenticatorResponseVerificationException::create('Unsupported attestation statement format.'); $attestationStatementSupport = $this->attestationStatementSupportManager->get($fmt); $clientDataJSONHash = hash('sha256', $authenticatorResponse->clientDataJSON ->rawData, true); $attestationStatementSupport->isValid( $clientDataJSONHash, $attestationObject->attStmt, $attestationObject->authData ) || throw AuthenticatorResponseVerificationException::create('Invalid attestation statement.'); } }
| ver. 1.4 |
Github
|
.
| PHP 8.2.30 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка