8000 [SecurityBundle] Fix error message when using OIDC and web-token/jwt-… · symfony/symfony@c106c5f · GitHub
[go: up one dir, main page]

Skip to content

Commit c106c5f

Browse files
[SecurityBundle] Fix error message when using OIDC and web-token/jwt-core is not installed
1 parent 1a9ac8d commit c106c5f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/AccessToken/OidcTokenHandlerFactory.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ public function create(ContainerBuilder $container, string $id, array|string $co
3434
);
3535

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

4343
// @see Symfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory\SignatureAlgorithmFactory

0 commit comments

Comments
 (0)
0