Skip to content

Commit

Permalink
feature #31309 [SecurityBundle] add "service" option in remember_me f…
Browse files Browse the repository at this point in the history
…irewall (Pchol)

This PR was squashed before being merged into the 5.1-dev branch.

Discussion
----------

[SecurityBundle] add "service" option in remember_me firewall

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

allow override remember me service

Commits
-------

bbf7421 [SecurityBundle] add "service" option in remember_me firewall
  • Loading branch information
nicolas-grekas committed Feb 4, 2020
2 parents 2aca43f + bbf7421 commit 71de431
Showing 1 changed file with 5 additions and 1 deletion.
Expand Up @@ -44,7 +44,10 @@ public function create(ContainerBuilder $container, string $id, array $config, ?
;

// remember me services
if (isset($config['token_provider'])) {
if (isset($config['service'])) {
$templateId = $config['service'];
$rememberMeServicesId = $templateId.'.'.$id;
} elseif (isset($config['token_provider'])) {
$templateId = 'security.authentication.rememberme.services.persistent';
$rememberMeServicesId = $templateId.'.'.$id;
} else {
Expand Down Expand Up @@ -135,6 +138,7 @@ public function addConfiguration(NodeDefinition $node)

$builder
->scalarNode('secret')->isRequired()->cannotBeEmpty()->end()
->scalarNode('service')->end()
->scalarNode('token_provider')->end()
->arrayNode('user_providers')
->beforeNormalization()
Expand Down

0 comments on commit 71de431

Please sign in to comment.