8000 feature #31309 [SecurityBundle] add "service" option in remember_me f… · symfony/symfony@71de431 · GitHub
[go: up one dir, main page]

Skip to content

Commit 71de431

Browse files
feature #31309 [SecurityBundle] add "service" option in remember_me firewall (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
2 parents 2aca43f + bbf7421 commit 71de431

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/RememberMeFactory.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,10 @@ public function create(ContainerBuilder $container, string $id, array $config, ?
4444
;
4545

4646
// remember me services
47-
if (isset($config['token_provider'])) {
47+
if (isset($config['service'])) {
48+
$templateId = $config['service'];
49+
$rememberMeServicesId = $templateId.'.'.$id;
50+
} elseif (isset($config['token_provider'])) {
4851
$templateId = 'security.authentication.rememberme.services.persistent';
4952
$rememberMeServicesId = $templateId.'.'.$id;
5053
} else {
@@ -135,6 +138,7 @@ public function addConfiguration(NodeDefinition $node)
135138

136139
$builder
137140
->scalarNode('secret')->isRequired()->cannotBeEmpty()->end()
141+
->scalarNode('service')->end()
138142
->scalarNode('token_provider')->end()
139143
->arrayNode('user_providers')
140144
->beforeNormalization()

0 commit comments

Comments
 (0)
0