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.'); } }