Backup Events
Background
Events
BackupEligibilityChangedEvent
<?php
declare(strict_types=1);
use Webauthn\Event\BackupEligibilityChangedEvent;
class BackupEligibilityListener
{
public function __invoke(BackupEligibilityChangedEvent $event): void
{
$credentialRecord = $event->credentialRecord;
$previousValue = $event->previousValue; // ?bool
$newValue = $event->newValue; // ?bool
if ($newValue === true && $previousValue !== true) {
// Credential has become backup-eligible
// Log this change for auditing purposes
}
}
}BackupStatusChangedEvent
Registering Event Listeners
Pure PHP (PSR-14)
Symfony
Security Considerations
See Also
Last updated
Was this helpful?