Class

Symfony\Component\Security\Http\Firewall\LogoutListener

class LogoutListener implements ListenerInterface

LogoutListener logout users.

Methods

__construct(SecurityContextInterface $securityContext, HttpUtils $httpUtils, string $logoutPath, string $targetUrl = '/', LogoutSuccessHandlerInterface $successHandler = null)

Constructor

void addHandler(LogoutHandlerInterface $handler)

Adds a logout handler

handle(GetResponseEvent $event)

Performs the logout if requested

Details

at line 45
public __construct(SecurityContextInterface $securityContext, HttpUtils $httpUtils, string $logoutPath, string $targetUrl = '/', LogoutSuccessHandlerInterface $successHandler = null)

Constructor

Parameters

SecurityContextInterface $securityContext
HttpUtils $httpUtils An HttpUtilsInterface instance
string $logoutPath The path that starts the logout process
string $targetUrl The URL to redirect to after logout
LogoutSuccessHandlerInterface $successHandler

at line 62
public void addHandler(LogoutHandlerInterface $handler)

Adds a logout handler

Parameters

LogoutHandlerInterface $handler

Return Value

void

at line 72
public handle(GetResponseEvent $event)

Performs the logout if requested

Parameters

GetResponseEvent $event A GetResponseEvent instance