$loader =
new PhpFileLoader($container,
new FileLocator(\
dirname(__DIR__
).'/../../Resources/config'
));
$loader->
load('security_authenticator_remember_me.php'
);
} if ('auto' ===
$config['secure'
]) { $config['secure'
] = null;
} // create remember me handler (which manage the remember-me cookies)
$rememberMeHandlerId = 'security.authenticator.remember_me_handler.'.
$firewallName;
if (isset($config['service'
]) &&
isset($config['token_provider'
])) { throw new InvalidConfigurationException(sprintf('You cannot use both "service" and "token_provider" in "security.firewalls.%s.remember_me".',
$firewallName));
} if (isset($config['service'
])) { $container->
register($rememberMeHandlerId, DecoratedRememberMeHandler::
class) ->
addArgument(new Reference($config['service'
])) ->
addTag('security.remember_me_handler',
['firewall' =>
$firewallName]);
} elseif (isset($config['token_provider'
])) { $tokenProviderId =
$this->
createTokenProvider($container,
$firewallName,
$config['token_provider'
]);
$tokenVerifier =
$this->
createTokenVerifier($container,
$firewallName,
$config['token_verifier'
] ?? null
);
$container->
setDefinition($rememberMeHandlerId,
new ChildDefinition('security.authenticator.persistent_remember_me_handler'
)) ->
replaceArgument(0,
new Reference($tokenProviderId))