-
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
[Security] Add security:oidc-token:generate command #60660
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
Conversation
4fba1cd to
d5b0868
Compare
|
Good call 👍I would make "token" or "jwt" part of the command name though as I find "oidc:generate" rather confusing (yup, no better suggestion yet 🙃). |
Sure! Not more inspired than you, I renamed it to |
Spomky
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a nice idea!
No remarks for this PR and OK with the name oidc-token:generate.
|
Maybe |
...y/Bundle/SecurityBundle/DependencyInjection/Security/AccessToken/OidcTokenHandlerFactory.php
Show resolved
Hide resolved
src/Symfony/Component/Security/Http/Command/OidcTokenGenerateCommand.php
Show resolved
Hide resolved
src/Symfony/Component/Security/Http/Command/OidcTokenGenerateCommand.php
Show resolved
Hide resolved
src/Symfony/Component/Security/Http/AccessToken/Oidc/OidcTokenGenerator.php
Outdated
Show resolved
Hide resolved
|
I like the |
OK, let's go with |
| ; | ||
| } | ||
|
|
||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extra new line
| */ | ||
| class OidcTokenGeneratorTest extends TestCase | ||
| { | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| * | ||
| * @final |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not needed as the class is already marked as final.
| * | |
| * @final |
730512f to
5c18b1a
Compare
|
Thank you @Jean-Beru. |
The
OidcTokenHandler, introduced in Symfony 6.3, allows to decode a JWT token, validate it and retrieve the user info from it.This pull request introduces a new Symfony command,
bin/console security:oidc-token:generate, designed to facilitate the generation of JWTs. It can be useful for generating a token for testing purpose.Argument and options
Usage
Tip
When there is only one value, both "firewall", "algorithm" and "issuer" are not required..