if (isset($config['csrf_token_generator'
])) { throw new InvalidConfigurationException('The "csrf_token_generator" on "form_login" does not exist, use "enable_csrf" instead.'
);
} $authenticatorId = 'security.authenticator.form_login.'.
$firewallName;
$options =
array_intersect_key($config,
$this->options
);
$authenticator =
$container ->
setDefinition($authenticatorId,
new ChildDefinition('security.authenticator.form_login'
)) ->
replaceArgument(1,
new Reference($userProviderId)) ->
replaceArgument(2,
new Reference($this->
createAuthenticationSuccessHandler($container,
$firewallName,
$config))) ->
replaceArgument(3,
new Reference($this->
createAuthenticationFailureHandler($container,
$firewallName,
$config))) ->
replaceArgument(4,
$options);
if ($options['use_forward'
] ?? false
) { $authenticator->
addMethodCall('setHttpKernel',
[new Reference('http_kernel'
)]);
} return $authenticatorId;
}}