Skip to content

[SecurityBundle] Don't require a user provider for the anonymous listener #34536

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 25, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
[SecurityBundle] Don't require a user provider for the anonymous list…
…ener
  • Loading branch information
Robin Chalas committed Nov 24, 2019
commit 0950cfbc65bc0b9bbeb682eb237d028a4e3033c5
Original file line number Diff line number Diff line change
Expand Up @@ -464,8 +464,8 @@ private function createAuthenticationListeners(ContainerBuilder $container, stri
throw new InvalidConfigurationException(sprintf('Invalid firewall "%s": user provider "%s" not found.', $id, $firewall[$key]['provider']));
}
$userProvider = $providerIds[$normalizedName];
} elseif ('remember_me' === $key) {
// RememberMeFactory will use the firewall secret when created
} elseif ('remember_me' === $key || 'anonymous' === $key) {
// RememberMeFactory will use the firewall secret when created, AnonymousAuthenticationListener does not load users.
$userProvider = null;
} elseif ($defaultProvider) {
$userProvider = $defaultProvider;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ public function testMissingProviderForListener()
$container->compile();
}

public function testPerListenerProviderWithRememberMe()
public function testPerListenerProviderWithRememberMeAndAnonymous()
{
$container = $this->getRawContainer();
$container->loadFromExtension('security', [
Expand All @@ -223,6 +223,7 @@ public function testPerListenerProviderWithRememberMe()
'default' => [
'form_login' => ['provider' => 'second'],
'remember_me' => ['secret' => 'baz'],
'anonymous' => true,
],
],
]);
Expand Down
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy