$this->data
['firewall'
] =
[ 'name' =>
$firewallConfig->
getName(),
'request_matcher' =>
$firewallConfig->
getRequestMatcher(),
'security_enabled' =>
$firewallConfig->
isSecurityEnabled(),
'stateless' =>
$firewallConfig->
isStateless(),
'provider' =>
$firewallConfig->
getProvider(),
'context' =>
$firewallConfig->
getContext(),
'entry_point' =>
$firewallConfig->
getEntryPoint(),
'access_denied_handler' =>
$firewallConfig->
getAccessDeniedHandler(),
'access_denied_url' =>
$firewallConfig->
getAccessDeniedUrl(),
'user_checker' =>
$firewallConfig->
getUserChecker(),
'authenticators' =>
$firewallConfig->
getAuthenticators(),
];
// generate exit impersonation path from current request
if ($this->data
['impersonated'
] && null !==
$switchUserConfig =
$firewallConfig->
getSwitchUser()) { $exitPath =
$request->
getRequestUri();
$exitPath .= null ===
$request->
getQueryString() ? '?' : '&';
$exitPath .=
sprintf('%s=%s',
urlencode($switchUserConfig['parameter'
]), SwitchUserListener::EXIT_VALUE
);
$this->data
['impersonation_exit_path'
] =
$exitPath;
} } }