class LogoutListener implements ListenerInterface
LogoutListener logout users.
__construct(TokenStorageInterface $tokenStorage, HttpUtils $httpUtils, LogoutSuccessHandlerInterface $successHandler, array $options = array(), CsrfTokenManagerInterface $csrfTokenManager = null) | ||
addHandler(LogoutHandlerInterface $handler) | ||
handle(GetResponseEvent $event) Performs the logout if requested. | ||
bool | requiresLogout(Request $request) Whether this request is asking for logout. |
TokenStorageInterface | $tokenStorage | |
HttpUtils | $httpUtils | An HttpUtils instance |
LogoutSuccessHandlerInterface | $successHandler | A LogoutSuccessHandlerInterface instance |
array | $options | An array of options to process a logout attempt |
CsrfTokenManagerInterface | $csrfTokenManager | A CsrfTokenManagerInterface instance |
LogoutHandlerInterface | $handler |
Performs the logout if requested.
If a CsrfTokenManagerInterface instance is available, it will be used to validate the request.
GetResponseEvent | $event |
LogoutException | if the CSRF token is invalid |
RuntimeException | if the LogoutSuccessHandlerInterface instance does not return a response |
Whether this request is asking for logout.
The default implementation only processed requests to a specific path, but a subclass could change this to logout requests where certain parameters is present.
Request | $request |
bool |
© 2004–2017 Fabien Potencier
Licensed under the MIT License.
https://api.symfony.com/4.1/Symfony/Component/Security/Http/Firewall/LogoutListener.html