File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -864,6 +864,31 @@ create your own User from the claims, you must
864864 }
865865 }
866866
867+ Creating a OIDC token from the command line
868+ -------------------------------------------
869+
870+ .. versionadded :: 7.4
871+
872+ The ``security:oidc:generate-token `` command was introduced in Symfony 7.4.
873+
874+ The ``security:oidc:generate-token `` command helps you generate JWTs. It's mostly
875+ useful when developing or testing applications that use OIDC authentication:
876+
877+ .. code-block :: terminal
878+
879+ # generate a token using the default configuration
880+ $ php bin/console security:oidc:generate-token john.doe@example.com
881+
882+ # specify the firewall, algorithm, and issuer if multiple are available
883+ $ php bin/console security:oidc:generate-token john.doe@example.com \
884+ --firewall="api" \
885+ --algorithm="HS256" \
886+ --issuer="https://example.com"
887+
888+ .. note ::
889+
890+ The JWK used for signing must have the appropriate `key operation flags `_ set.
891+
867892Using CAS 2.0
868893-------------
869894
@@ -1082,3 +1107,4 @@ for :ref:`stateless firewalls <reference-security-stateless>`.
10821107.. _`OpenID Connect Discovery` : https://openid.net/specs/openid-connect-discovery-1_0.html
10831108.. _`RFC6750` : https://datatracker.ietf.org/doc/html/rfc6750
10841109.. _`SAML2 (XML structures)` : https://docs.oasis-open.org/security/saml/Post2.0/sstc-saml-tech-overview-2.0.html
1110+ .. _`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