10000 bug #50503 [SecurityBundle] Fix error message when using OIDC and web… · symfony/symfony@99e1b1f · GitHub
[go: up one dir, main page]

Skip to content

Commit 99e1b1f

Browse files
bug #50503 [SecurityBundle] Fix error message when using OIDC and web-token/jwt-core is not installed (nicolas-grekas)
This PR was merged into the 6.3 branch. Discussion ---------- [SecurityBundle] Fix error message when using OIDC and web-token/jwt-core is not installed | Q | A | ------------- | --- | Branch? | 6.3 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Fix #50491 | License | MIT | Doc PR | - Before: > Service "security.access_token_handler.oidc.signature.ES256": Cannot replace arguments for class "Jose\Component\Signature\Algorithm\ES256" if none have been configured yet. After: > You cannot use the "oidc" token handler since "web-token/jwt-core" is not installed. Try running "composer require web-token/jwt-core". /cc `@vincentchalamon` Commits ------- c106c5f [SecurityBundle] Fix error message when using OIDC and web-token/jwt-core is not installed
2 parents 14b1088 + c106c5f commit 99e1b1f

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