ExceptionListener

ExceptionListener

class ExceptionListener

ExceptionListener catches authentication exception and converts them to Response instances.

Traits

TargetPathTrait Trait to get (and set) the URL the user last visited before being forced to authenticate.

Methods

__construct(TokenStorageInterface $tokenStorage, AuthenticationTrustResolverInterface $trustResolver, HttpUtils $httpUtils, $providerKey, AuthenticationEntryPointInterface $authenticationEntryPoint = null, $errorPage = null, AccessDeniedHandlerInterface $accessDeniedHandler = null, LoggerInterface $logger = null, $stateless = false)
register(EventDispatcherInterface $dispatcher)

Registers a onKernelException listener to take care of security exceptions.

unregister(EventDispatcherInterface $dispatcher)

Unregisters the dispatcher.

onKernelException(GetResponseForExceptionEvent $event)

Handles security related exceptions.

Details

__construct(TokenStorageInterface $tokenStorage, AuthenticationTrustResolverInterface $trustResolver, HttpUtils $httpUtils, $providerKey, AuthenticationEntryPointInterface $authenticationEntryPoint = null, $errorPage = null, AccessDeniedHandlerInterface $accessDeniedHandler = null, LoggerInterface $logger = null, $stateless = false)

Parameters

TokenStorageInterface $tokenStorage
AuthenticationTrustResolverInterface $trustResolver
HttpUtils $httpUtils
$providerKey
AuthenticationEntryPointInterface $authenticationEntryPoint
$errorPage
AccessDeniedHandlerInterface $accessDeniedHandler
LoggerInterface $logger
$stateless

register(EventDispatcherInterface $dispatcher)

Registers a onKernelException listener to take care of security exceptions.

Parameters

EventDispatcherInterface $dispatcher An EventDispatcherInterface instance

unregister(EventDispatcherInterface $dispatcher)

Unregisters the dispatcher.

Parameters

EventDispatcherInterface $dispatcher An EventDispatcherInterface instance

onKernelException(GetResponseForExceptionEvent $event)

Handles security related exceptions.

Parameters

GetResponseForExceptionEvent $event An GetResponseForExceptionEvent instance

© 2004–2017 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/3.3/Symfony/Component/Security/Http/Firewall/ExceptionListener.html

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部