-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Closed
Labels
area-authIncludes: Authn, Authz, OAuth, OIDC, BearerIncludes: Authn, Authz, OAuth, OIDC, Bearer
Milestone
Description
Is there an existing issue for this?
- I have searched the existing issues
Is your feature request related to a problem? Please describe the problem.
When using the new dotnet user-jwts tool, users may paste formatted date times in from other sources (e.g. decoding another existing JWT using something like jwt.io).
Describe the solution you'd like
To make copy-paste in these scenarios, supporting the "O" format would make the tool more user-friendly.
The tool already supports 4 different possible formats:
| "yyyy-MM-dd", "yyyy-MM-dd HH:mm", "yyyy/MM/dd", "yyyy/MM/dd HH:mm" }; |
It displays the values in "O" format from the list command, so would support round-tripping when decoded.
aspnetcore/src/Tools/dotnet-user-jwts/src/Commands/ListCommand.cs
Lines 55 to 62 in 6b2e422
| if (showTokens) | |
| { | |
| table.AddRow(jwt.Id, jwt.Scheme, jwt.Audience, jwt.Issued.ToString("O"), jwt.Expires.ToString("O"), jwt.Token); | |
| } | |
| else | |
| { | |
| table.AddRow(jwt.Id, jwt.Scheme, jwt.Audience, jwt.Issued.ToString("O"), jwt.Expires.ToString("O")); | |
| } |
Additional context
See #41956 (comment).
/cc @DamianEdwards
Metadata
Metadata
Assignees
Labels
area-authIncludes: Authn, Authz, OAuth, OIDC, BearerIncludes: Authn, Authz, OAuth, OIDC, Bearer