8000 [SecurityBundle] Fix error message when using OIDC and web-token/jwt-core is not installed by nicolas-grekas · Pull Request #50503 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[SecurityBundle] Fix error message when using OIDC and web-token/jwt-core is not installed #50503

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
May 31, 2023
Merged
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] Fix error message when using OIDC and web-token/jwt-…
…core is not installed
  • Loading branch information
nicolas-grekas committed May 31, 2023
commit c106c5f01d7757f10a302230b7bdcb2f38b7b9b8
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ public function create(ContainerBuilder $container, string $id, array|string $co
);

if (!ContainerBuilder::willBeAvailable('web-token/jwt-core', Algorithm::class, ['symfony/security-bundle'])) {
$container->register('security.access_token_handler.oidc.signature', Algorithm::class)
->addError('You cannot use the "oidc" token handler since "web-token/jwt-core" is not installed. Try running "web-token/jwt-core".');
$container->register('security.access_token_handler.oidc.jwk', JWK::class)
->addError('You cannot use the "oidc" token handler since "web-token/jwt-core" is not installed. Try running "web-token/jwt-core".');
$container->getDefinition('security.access_token_handler.oidc.signature', Algorithm::class)
->addError('You cannot use the "oidc" token handler since "web-token/jwt-core" is not installed. Try running "composer require web-token/jwt-core".');
$container->getDefinition('security.access_token_handler.oidc.jwk', JWK::class)
->addError('You cannot use the "oidc" token handler since "web-token/jwt-core" is not installed. Try running "composer require web-token/jwt-core".');
}

// @see Symfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory\SignatureAlgorithmFactory
Expand Down
0