<?php
namespace App\Security\Listener;
use App\Security\Event\BuildPassport;
use Symfony\Component\Security\Http\Authenticator\Passport\Badge\PreAuthenticatedUserBadge;
use Symfony\Component\Security\Http\Authenticator\Passport\Badge\UserBadge;
use Symfony\Component\Security\Http\Authenticator\Passport\SelfValidatingPassport;
class DefaultPassportListener
{
public function __invoke(BuildPassport $event): void
{
// example passport that requires no authentication.
// $event->setPassport(new SelfValidatingPassport(new UserBadge($event->id()), [new PreAuthenticatedUserBadge()]));
}
}