Make dotnet user-jwts create
scriptable
#42146
Labels
area-commandlinetools
Includes: Command line tools, dotnet-dev-certs, dotnet-user-jwts, and OpenAPI
feature-userjwts
The `dotnet user-jwts` CLI tool
old-area-web-frameworks-do-not-use
*DEPRECATED* This label is deprecated in favor of the area-mvc and area-minimal labels
Milestone
Is there an existing issue for this?
Is your feature request related to a problem? Please describe the problem.
While looking at #42125 I noticed that, because it's designed for humans to use, the output from the
dotnet user-jwts create
command is quite "wordy".That's cool, it's a tool to help devs do manual testing of their APIs. They can read it, then copy the token from the terminal.
However, if a dev then wanted to script things with a created JWT, it's suddenly a bit hacky to run the tool and try and parse the output to get the generated JWT.
Describe the solution you'd like
An additional flag that can be passed to
dotnet user-jwts create
that will just output the JWT to the output with no other information (in the case of success, at least).I can't think of a good name for it right now, so for the purpose of the example it's called
--only-output-jwt
:Then using PowerShell as an example, you could generate a valid JWT and assign it directly into a variable, then use it to make HTTP requests:
Additional context
No response
The text was updated successfully, but these errors were encountered: