$passport =
$event->
getPassport();
if ($passport->
hasBadge(PreAuthenticatedUserBadge::
class)) { return;
} $this->userChecker->
checkPreAuth($passport->
getUser());
} public function postCheckCredentials(AuthenticationSuccessEvent
$event): void
{ $user =
$event->
getAuthenticationToken()->
getUser();
if (!
$user instanceof UserInterface
) { return;
} $this->userChecker->
checkPostAuth($user);
} public static function getSubscribedEvents(): array
{ return [ CheckPassportEvent::
class => ['preCheckCredentials', 256
],