Skip to content

Add support for --output option in user-jwts create#42249

Merged
captainsafia merged 2 commits into
dotnet:mainfrom
captainsafia:user-jwts-create-scriptable
Jun 17, 2022
Merged

Add support for --output option in user-jwts create#42249
captainsafia merged 2 commits into
dotnet:mainfrom
captainsafia:user-jwts-create-scriptable

Conversation

@captainsafia
Copy link
Copy Markdown
Contributor

Closes #42146.

Adds --output option with support for token, default, or json formats.

$ dotnet user-jwts create --output json
{
  "Id": "5c25c91",
  "Scheme": "Bearer",
  "Name": "safia",
  "Audience": "https://localhost:5001, http://localhost:5000",
  "NotBefore": "2022-06-17T00:40:39+00:00",
  "Expires": "2022-09-17T00:40:39+00:00",
  "Issued": "2022-06-17T00:40:40+00:00",
  "Token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1bmlxdWVfbmFtZSI6InNhZmlhIiwic3ViIjoic2FmaWEiLCJqdGkiOiI1YzI1YzkxIiwiYXVkIjpbImh0dHBzOi8vbG9jYWxob3N0OjUwMDEiLCJodHRwOi8vbG9jYWxob3N0OjUwMDAiXSwibmJmIjoxNjU1NDI2NDM5LCJleHAiOjE2NjMzNzUyMzksImlhdCI6MTY1NTQyNjQ0MCwiaXNzIjoiZG90bmV0LXVzZXItand0cyJ9.10-htDV9iNvwJ0MR34TbW92PVAxBfgcHDwmONHOZ2M4",
  "Scopes": [],
  "Roles": [],
  "CustomClaims": {}
}
$ dotnet user-jwts create -o token
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1bmlxdWVfbmFtZSI6InNhZmlhIiwic3ViIjoic2FmaWEiLCJqdGkiOiI5ZGYwNzc4NSIsImF1ZCI6WyJodHRwczovL2xvY2FsaG9zdDo1MDAxIiwiaHR0cDovL2xvY2FsaG9zdDo1MDAwIl0sIm5iZiI6MTY1NTQyNjM2NywiZXhwIjoxNjYzMzc1MTY3LCJpYXQiOjE2NTU0MjYzNjcsImlzcyI6ImRvdG5ldC11c2VyLWp3dHMifQ.NetCzGHj_wHjXf3Vg6qI9KAPLLrUAJWY722QMDDCapA

@captainsafia captainsafia requested a review from a team June 17, 2022 00:42
@captainsafia captainsafia requested a review from Pilchie as a code owner June 17, 2022 00:42
@ghost ghost added the area-commandlinetools Includes: Command line tools, dotnet-dev-certs, dotnet-user-jwts, and OpenAPI label Jun 17, 2022
@captainsafia captainsafia added old-area-web-frameworks-do-not-use *DEPRECATED* This label is deprecated in favor of the area-mvc and area-minimal labels feature-userjwts The `dotnet user-jwts` CLI tool and removed area-commandlinetools Includes: Command line tools, dotnet-dev-certs, dotnet-user-jwts, and OpenAPI labels Jun 17, 2022
Comment thread src/Tools/dotnet-user-jwts/src/Resources.resx Outdated
Co-authored-by: Brennan <brecon@microsoft.com>
@captainsafia captainsafia enabled auto-merge (squash) June 17, 2022 01:09
@captainsafia captainsafia merged commit 92823e5 into dotnet:main Jun 17, 2022
@ghost ghost added this to the 7.0-preview6 milestone Jun 17, 2022
@amcasey amcasey added the area-commandlinetools Includes: Command line tools, dotnet-dev-certs, dotnet-user-jwts, and OpenAPI label Jun 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make dotnet user-jwts create scriptable

3 participants