mediatekformation

LogoutListener extends AbstractListener
in package
implements ListenerInterface Uses LegacyListenerTrait

LogoutListener logout users.

Tags
author

Fabien Potencier fabien@symfony.com

final

since Symfony 4.3

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

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

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
throws
LogoutException

if the CSRF token is invalid

throws
RuntimeException

if the LogoutSuccessHandlerInterface instance does not return a response

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
Return values
bool

Search results