Symfony2 API
Class

Symfony\Component\Security\Http\Firewall\ExceptionListener

class ExceptionListener

ExceptionListener catches authentication exception and converts them to Response instances.

Methods

__construct(SecurityContextInterface $context, AuthenticationTrustResolverInterface $trustResolver, HttpUtils $httpUtils, $providerKey, AuthenticationEntryPointInterface $authenticationEntryPoint = null, $errorPage = null, AccessDeniedHandlerInterface $accessDeniedHandler = null, LoggerInterface $logger = null)

register(EventDispatcherInterface $dispatcher)

Registers a onKernelException listener to take care of security exceptions.

onKernelException(GetResponseForExceptionEvent $event)

Handles security related exceptions.

Details

at line 50
public __construct(SecurityContextInterface $context, AuthenticationTrustResolverInterface $trustResolver, HttpUtils $httpUtils, $providerKey, AuthenticationEntryPointInterface $authenticationEntryPoint = null, $errorPage = null, AccessDeniedHandlerInterface $accessDeniedHandler = null, LoggerInterface $logger = null)

Parameters

SecurityContextInterface $context
AuthenticationTrustResolverInterface $trustResolver
HttpUtils $httpUtils
$providerKey
AuthenticationEntryPointInterface $authenticationEntryPoint
$errorPage
AccessDeniedHandlerInterface $accessDeniedHandler
LoggerInterface $logger

at line 67
public register(EventDispatcherInterface $dispatcher)

Registers a onKernelException listener to take care of security exceptions.

Parameters

EventDispatcherInterface $dispatcher An EventDispatcherInterface instance

at line 77
public onKernelException(GetResponseForExceptionEvent $event)

Handles security related exceptions.

Parameters

GetResponseForExceptionEvent $event An GetResponseForExceptionEvent instance