LogoutListener

LogoutListener

class LogoutListener implements ListenerInterface

LogoutListener logout users.

Methods

__construct(TokenStorageInterface $tokenStorage, HttpUtils $httpUtils, LogoutSuccessHandlerInterface $successHandler, array $options = array(), CsrfTokenManagerInterface|null $csrfTokenManager = null)

Constructor.

addHandler(LogoutHandlerInterface $handler)

Adds a logout handler.

handle(GetResponseEvent $event)

Performs the logout if requested.

Details

__construct(TokenStorageInterface $tokenStorage, HttpUtils $httpUtils, LogoutSuccessHandlerInterface $successHandler, array $options = array(), CsrfTokenManagerInterface|null $csrfTokenManager = null)

Constructor.

Parameters

TokenStorageInterface $tokenStorage
HttpUtils $httpUtils An HttpUtils instance
LogoutSuccessHandlerInterface $successHandler A LogoutSuccessHandlerInterface instance
array $options An array of options to process a logout attempt
CsrfTokenManagerInterface|null $csrfTokenManager A CsrfTokenManagerInterface instance

addHandler(LogoutHandlerInterface $handler)

Adds a logout handler.

Parameters

LogoutHandlerInterface $handler

handle(GetResponseEvent $event)

Performs the logout if requested.

If a CsrfTokenManagerInterface instance is available, it will be used to validate the request.

Parameters

GetResponseEvent $event

Exceptions

LogoutException if the CSRF token is invalid
RuntimeException if the LogoutSuccessHandlerInterface instance does not return a response

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

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部