-
-
Notifications
You must be signed in to change notification settings - Fork 614
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
Wrong definition of AccessTokenBuilder #1209
Comments
I've investigated the problem a little deeper, and I think I've found a better solution. Firstly, you have incorrectly described the
and check emptiness of collections:
|
This has been fixed. Thanks |
…abled (NeuralClone) This PR was merged into the 3.x branch. Discussion ---------- Fix default values in WebToken services when encryption disabled | Q | A | --- | --- | Symfony Version | 6.4.x | Bundle Version | 3.0.0 | PHP Version | 8.2 | Fixed Tickets | fixes #1223 | Related Issues/PRs | #1209, #1214 This PR fixes the default values in the `AccessTokenBuilder` and `AccessTokenLoader` services when encryption is disabled. Commits ------- ff16323 Fix default values in WebToken services when encryption disabled
Hello.
I have encountered a problem, and it seems that it is related to an incorrect definition in the file
Resources/config/web_token_issuance.xml
:You have the 5th, 6th and 7th arguments, which must be nulls in case we don't use encryption. But it doesn't seem that Symfony works that way - for text arguments,
on-invalid="null"
directive just doesn't work, the value of these arguments is an empty string ''. So the serviceServices/WebToken/AccessTokenBuilder.php
receives these arguments and does not work correctly.As a solution, I would suggest in the file
DependencyInjection/LexikJWTAuthenticationExtension.php
explicitly prescribe values in these arguments for the case when we do not encrypt the keys. Like this:BTW the same is true for the service
Lexik\Bundle\JWTAuthenticationBundle\Services\WebToken\AccessTokenLoader
. It has nullable arguments but receives empty arrays instead of nulls (see last arguments):The text was updated successfully, but these errors were encountered: