Symfony2 API
Class

Symfony\Component\Security\Http\Firewall\SwitchUserListener

class SwitchUserListener implements ListenerInterface

SwitchUserListener allows a user to impersonate another one temporarily (like the Unix su command).

Methods

__construct(SecurityContextInterface $securityContext, UserProviderInterface $provider, UserCheckerInterface $userChecker, $providerKey, AccessDecisionManagerInterface $accessDecisionManager, LoggerInterface $logger = null, $usernameParameter = '_switch_user', $role = 'ROLE_ALLOWED_TO_SWITCH', EventDispatcherInterface $dispatcher = null)

Constructor.

handle(GetResponseEvent $event)

This interface must be implemented by firewall listeners.

Details

at line 53
public __construct(SecurityContextInterface $securityContext, UserProviderInterface $provider, UserCheckerInterface $userChecker, $providerKey, AccessDecisionManagerInterface $accessDecisionManager, LoggerInterface $logger = null, $usernameParameter = '_switch_user', $role = 'ROLE_ALLOWED_TO_SWITCH', EventDispatcherInterface $dispatcher = null)

Constructor.

Parameters

SecurityContextInterface $securityContext
UserProviderInterface $provider
UserCheckerInterface $userChecker
$providerKey
AccessDecisionManagerInterface $accessDecisionManager
LoggerInterface $logger
$usernameParameter
$role
EventDispatcherInterface $dispatcher

at line 77
public handle(GetResponseEvent $event)

This interface must be implemented by firewall listeners.

Parameters

GetResponseEvent $event A GetResponseEvent instance