forked from symfony/symfony
-
-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature symfony#57369 [Security] Display authenticators in the profil…
…er even if they are all skipped (MatTheCat) This PR was squashed before being merged into the 7.2 branch. Discussion ---------- [Security] Display authenticators in the profiler even if they are all skipped | Q | A | ------------- | --- | Branch? | 7.2 | Bug fix? | no | New feature? | yes | Deprecations? | no | Issues | N/A | License | MIT Currently if no authenticator supports the request, the `_security_skipped_authenticators` request attribute is not set which (among others) results in an empty list in the profiler’s security panel’s authenticators tab: ![](https://github.com/symfony/symfony/assets/1898254/37f63661-ad21-4945-b05a-396f4781b88f) It makes more sense to display them all as not supported: ![](https://github.com/symfony/symfony/assets/1898254/ca7241c8-92f1-47f7-bdea-96fce6daf910) Commits ------- 06f7876 [Security] Display authenticators in the profiler even if they are all skipped
- Loading branch information
Showing
8 changed files
with
64 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,6 +25,7 @@ | |
use Symfony\Component\Console\Style\SymfonyStyle; | ||
use Symfony\Component\EventDispatcher\EventDispatcherInterface; | ||
use Symfony\Component\Security\Http\Authenticator\AuthenticatorInterface; | ||
use Symfony\Component\Security\Http\Authenticator\Debug\TraceableAuthenticator; | ||
|
||
/** | ||
* @author Timo Bakx <[email protected]> | ||
|
@@ -210,7 +211,7 @@ private function displayAuthenticators(string $name, SymfonyStyle $io): void | |
$io->table( | ||
['Classname'], | ||
array_map( | ||
fn ($authenticator) => [$authenticator::class], | ||
fn ($authenticator) => [($authenticator instanceof TraceableAuthenticator ? $authenticator->getAuthenticator() : $authenticator)::class], | ||
$authenticators | ||
) | ||
); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters