$this->authenticationTrustResolver =
$trustResolver;
$this->errorPage =
$errorPage;
$this->logger =
$logger;
$this->stateless =
$stateless;
} /**
* Registers a onKernelException listener to take care of security exceptions.
*/
public function register(EventDispatcherInterface
$dispatcher): void
{ $dispatcher->
addListener(KernelEvents::EXCEPTION,
$this->
onKernelException(...
), 1
);
} /**
* Unregisters the dispatcher.
*/
public function unregister(EventDispatcherInterface
$dispatcher): void
{ $dispatcher->
removeListener(KernelEvents::EXCEPTION,
$this->
onKernelException(...
));
} /**
* Handles security related exceptions.
*/