File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -877,6 +877,34 @@ create your own User from the claims, you must
877877 }
878878 }
879879
880+ Creating a OIDC token from the command line
881+ -------------------------------------------
882+
883+ .. versionadded :: 7.4
884+
885+ The ``security:oidc:generate-token `` command was introduced in Symfony 7.4.
886+
887+ The ``security:oidc:generate-token `` command helps you generate JWTs. This is
888+ particularly useful when developing or testing applications that use OIDC
889+ authentication.
890+
891+ To generate a token using the default configuration:
892+
893+ .. code-block :: terminal
894+
895+ # generate a token for the user named "john.doe@example.com"
896+ $ php bin/console security:oidc:generate-token john.doe@example.com
897+
898+ # generate a token when multiple firewall, algorithm or issuer are available
899+ $ php bin/console security:oidc:generate-token john.doe@example.com \
900+ --firewall="api" \
901+ --algorithm="HS256" \
902+ --issuer="https://example.com"
903+
904+ .. note ::
905+
906+ The JWK used for signing must have the appropriate `key operation flags `_ set.
907+
880908Using CAS 2.0
881909-------------
882910
@@ -1099,3 +1127,4 @@ for :ref:`stateless firewalls <reference-security-stateless>`.
10991127.. _`OpenID Connect Discovery` : https://openid.net/specs/openid-connect-discovery-1_0.html
11001128.. _`RFC6750` : https://datatracker.ietf.org/doc/html/rfc6750
11011129.. _`SAML2 (XML structures)` : https://docs.oasis-open.org/security/saml/Post2.0/sstc-saml-tech-overview-2.0.html
1130+ .. _`key operation flags` : https://www.iana.org/assignments/jose/jose.xhtml#web-key-operations
You can’t perform that action at this time.
0 commit comments