mediatekformation

ExceptionListener
in package
Uses TargetPathTrait

ExceptionListener catches authentication exception and converts them to Response instances.

Tags
author

Fabien Potencier fabien@symfony.com

final

since Symfony 4.3, EventDispatcherInterface type-hints will be updated to the interface from symfony/contracts in 5.0

Table of Contents

$accessDeniedHandler  : mixed
$authenticationEntryPoint  : mixed
$authenticationTrustResolver  : mixed
$errorPage  : mixed
$httpUtils  : mixed
$logger  : mixed
$providerKey  : mixed
$stateless  : mixed
$tokenStorage  : mixed
__construct()  : mixed
onKernelException()  : mixed
Handles security related exceptions.
register()  : mixed
Registers a onKernelException listener to take care of security exceptions.
unregister()  : mixed
Unregisters the dispatcher.
setTargetPath()  : mixed
getTargetPath()  : string|null
Returns the URL (if any) the user visited that forced them to login.
handleAccessDeniedException()  : mixed
handleAuthenticationException()  : void
handleLogoutException()  : void
removeTargetPath()  : mixed
Removes the target path from the session.
saveTargetPath()  : mixed
Sets the target path the user should be redirected to after authentication.
startAuthentication()  : Response

Properties

Methods

__construct()

public __construct(TokenStorageInterface $tokenStorage, AuthenticationTrustResolverInterface $trustResolver, HttpUtils $httpUtils, string $providerKey[, AuthenticationEntryPointInterface $authenticationEntryPoint = null ][, string $errorPage = null ][, AccessDeniedHandlerInterface $accessDeniedHandler = null ][, LoggerInterface $logger = null ][, bool $stateless = false ]) : mixed
Parameters
$tokenStorage : TokenStorageInterface
$trustResolver : AuthenticationTrustResolverInterface
$httpUtils : HttpUtils
$providerKey : string
$authenticationEntryPoint : AuthenticationEntryPointInterface = null
$errorPage : string = null
$accessDeniedHandler : AccessDeniedHandlerInterface = null
$logger : LoggerInterface = null
$stateless : bool = false
Return values
mixed

setTargetPath()

protected setTargetPath(Request $request) : mixed
Parameters
$request : Request
Return values
mixed

getTargetPath()

Returns the URL (if any) the user visited that forced them to login.

private getTargetPath(SessionInterface $session, string $providerKey) : string|null
Parameters
$session : SessionInterface
$providerKey : string
Return values
string|null

removeTargetPath()

Removes the target path from the session.

private removeTargetPath(SessionInterface $session, string $providerKey) : mixed
Parameters
$session : SessionInterface
$providerKey : string
Return values
mixed

saveTargetPath()

Sets the target path the user should be redirected to after authentication.

private saveTargetPath(SessionInterface $session, string $providerKey, string $uri) : mixed

Usually, you do not need to set this directly.

Parameters
$session : SessionInterface
$providerKey : string
$uri : string
Return values
mixed

Search results