diff --git a/src/Service/AuthenticatorStatusValidator.php b/src/Service/AuthenticatorStatusValidator.php index 5d4f8b6b..7dbe165d 100644 --- a/src/Service/AuthenticatorStatusValidator.php +++ b/src/Service/AuthenticatorStatusValidator.php @@ -23,6 +23,7 @@ use Surfnet\Webauthn\Exception\AuthenticatorStatusNotSupportedException; use Webauthn\MetadataService\Statement\AuthenticatorStatus; use Webauthn\MetadataService\Statement\StatusReport; +use function array_walk; class AuthenticatorStatusValidator { @@ -56,18 +57,22 @@ public function validate(array $statusReports): void { $meetsRequirement = false; $reportsProcessed = 0; + $reportLog = []; foreach ($statusReports as $report) { if (in_array($report->status, $this->allowedStatus)) { $meetsRequirement = true; } $reportsProcessed++; + $reportLog[] = $report->status; } if (!$meetsRequirement) { throw new AuthenticatorStatusNotSupportedException( sprintf( - 'Of the %d StatusReports tested, none met one of the required FIDO Certified statuses', - $reportsProcessed + 'Of the %d StatusReports tested, none met one of the required FIDO Certified statuses. ' . + 'Reports tested: "%s"', + $reportsProcessed, + implode(', ', $reportLog) ) ); }