Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.6k
[Security] Remove everything related to the deprecated authentication manager#41613
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Changes fromall commits
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -78,10 +78,7 @@ public function getUser(): ?object | ||
return null; | ||
} | ||
return $token->getUser(); | ||
} | ||
/** | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -409,13 +409,7 @@ protected function getUser(): ?object | ||
return null; | ||
} | ||
return $token->getUser(); | ||
} | ||
/** | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -35,23 +35,17 @@ final class DebugFirewallCommand extends Command | ||
private $contexts; | ||
private $eventDispatchers; | ||
private $authenticators; | ||
/** | ||
* @param string[] $firewallNames | ||
* @param AuthenticatorInterface[][] $authenticators | ||
*/ | ||
public function __construct(array $firewallNames, ContainerInterface $contexts, ContainerInterface $eventDispatchers, array $authenticators) | ||
wouterj marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
{ | ||
$this->firewallNames = $firewallNames; | ||
$this->contexts = $contexts; | ||
$this->eventDispatchers = $eventDispatchers; | ||
$this->authenticators = $authenticators; | ||
parent::__construct(); | ||
} | ||
@@ -119,9 +113,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int | ||
$this->displayEventListeners($name, $context, $io); | ||
} | ||
$this->displayAuthenticators($name, $io); | ||
return 0; | ||
} | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -17,7 +17,6 @@ | ||
use Symfony\Component\HttpFoundation\Response; | ||
use Symfony\Component\HttpKernel\DataCollector\DataCollector; | ||
use Symfony\Component\HttpKernel\DataCollector\LateDataCollectorInterface; | ||
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface; | ||
use Symfony\Component\Security\Core\Authentication\Token\SwitchUserToken; | ||
use Symfony\Component\Security\Core\Authorization\AccessDecisionManagerInterface; | ||
@@ -44,22 +43,16 @@ class SecurityDataCollector extends DataCollector implements LateDataCollectorIn | ||
private $firewallMap; | ||
private $firewall; | ||
private $hasVarDumper; | ||
public function __construct(TokenStorageInterface $tokenStorage = null, RoleHierarchyInterface $roleHierarchy = null, LogoutUrlGenerator $logoutUrlGenerator = null, AccessDecisionManagerInterface $accessDecisionManager = null, FirewallMapInterface $firewallMap = null, TraceableFirewallListener $firewall = null) | ||
wouterj marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
{ | ||
$this->tokenStorage = $tokenStorage; | ||
$this->roleHierarchy = $roleHierarchy; | ||
$this->logoutUrlGenerator = $logoutUrlGenerator; | ||
$this->accessDecisionManager = $accessDecisionManager; | ||
$this->firewallMap = $firewallMap; | ||
$this->firewall = $firewall; | ||
$this->hasVarDumper = class_exists(ClassStub::class); | ||
} | ||
/** | ||
@@ -104,8 +97,7 @@ public function collect(Request $request, Response $response, \Throwable $except | ||
$impersonatorUser = null; | ||
if ($token instanceof SwitchUserToken) { | ||
$originalToken = $token->getOriginalToken(); | ||
$impersonatorUser = $originalToken->getUserIdentifier(); | ||
} | ||
if (null !== $this->roleHierarchy) { | ||
@@ -118,7 +110,7 @@ public function collect(Request $request, Response $response, \Throwable $except | ||
$logoutUrl = null; | ||
try { | ||
if (null !== $this->logoutUrlGenerator) { | ||
$logoutUrl = $this->logoutUrlGenerator->getLogoutPath(); | ||
} | ||
} catch (\Exception $e) { | ||
@@ -134,8 +126,7 @@ public function collect(Request $request, Response $response, \Throwable $except | ||
'token' => $token, | ||
'token_class' => $this->hasVarDumper ? new ClassStub(\get_class($token)) : \get_class($token), | ||
'logout_url' => $logoutUrl, | ||
'user' => $token->getUserIdentifier(), | ||
'roles' => $assignedRoles, | ||
'inherited_roles' => array_unique($inheritedRoles), | ||
'supports_role_hierarchy' => null !== $this->roleHierarchy, | ||
@@ -184,7 +175,6 @@ public function collect(Request $request, Response $response, \Throwable $except | ||
if (null !== $firewallConfig) { | ||
$this->data['firewall'] = [ | ||
'name' => $firewallConfig->getName(), | ||
'request_matcher' => $firewallConfig->getRequestMatcher(), | ||
'security_enabled' => $firewallConfig->isSecurityEnabled(), | ||
'stateless' => $firewallConfig->isStateless(), | ||
@@ -213,8 +203,6 @@ public function collect(Request $request, Response $response, \Throwable $except | ||
if ($this->firewall) { | ||
$this->data['listeners'] = $this->firewall->getWrappedListeners(); | ||
} | ||
} | ||
/** | ||
@@ -362,9 +350,4 @@ public function getName(): string | ||
{ | ||
return 'security'; | ||
} | ||
} |
This file was deleted.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.