LogoutListener
extends AbstractListener
in package
implements
ListenerInterface
Uses
LegacyListenerTrait
LogoutListener logout users.
Tags
Interfaces, Classes, Traits and Enums
- ListenerInterface
- Interface that must be implemented by firewall listeners.
Table of Contents
- $csrfTokenManager : mixed
- $handlers : mixed
- $httpUtils : mixed
- $options : mixed
- $successHandler : mixed
- $tokenStorage : mixed
- __construct() : mixed
- __invoke() : mixed
- addHandler() : mixed
- authenticate() : mixed
- Performs the logout if requested.
- supports() : bool|null
- Tells whether the authenticate() method should be called or not depending on the incoming request.
- requiresLogout() : bool
- Whether this request is asking for logout.
Properties
$csrfTokenManager
private
mixed
$csrfTokenManager
$handlers
private
mixed
$handlers
$httpUtils
private
mixed
$httpUtils
$options
private
mixed
$options
$successHandler
private
mixed
$successHandler
$tokenStorage
private
mixed
$tokenStorage
Methods
__construct()
public
__construct(TokenStorageInterface $tokenStorage, HttpUtils $httpUtils, LogoutSuccessHandlerInterface $successHandler[, array<string|int, mixed> $options = [] ][, CsrfTokenManagerInterface $csrfTokenManager = null ]) : mixed
Parameters
- $tokenStorage : TokenStorageInterface
- $httpUtils : HttpUtils
- $successHandler : LogoutSuccessHandlerInterface
- $options : array<string|int, mixed> = []
-
An array of options to process a logout attempt
- $csrfTokenManager : CsrfTokenManagerInterface = null
Return values
mixed —__invoke()
public
final __invoke(RequestEvent $event) : mixed
Parameters
- $event : RequestEvent
Return values
mixed —addHandler()
public
addHandler(LogoutHandlerInterface $handler) : mixed
Parameters
- $handler : LogoutHandlerInterface
Return values
mixed —authenticate()
Performs the logout if requested.
public
authenticate(RequestEvent $event) : mixed
If a CsrfTokenManagerInterface instance is available, it will be used to validate the request.
Parameters
- $event : RequestEvent
Tags
Return values
mixed —supports()
Tells whether the authenticate() method should be called or not depending on the incoming request.
public
supports(Request $request) : bool|null
Parameters
- $request : Request
Return values
bool|null —requiresLogout()
Whether this request is asking for logout.
protected
requiresLogout(Request $request) : bool
The default implementation only processed requests to a specific path, but a subclass could change this to logout requests where certain parameters is present.
Parameters
- $request : Request