Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gabrielweyer/dotnet-decode-jwt
Decode a JSON Web Token Claims.
https://github.com/gabrielweyer/dotnet-decode-jwt
dotnet dotnet-global-tools github-actions jwt nuget
Last synced: 3 months ago
JSON representation
Decode a JSON Web Token Claims.
- Host: GitHub
- URL: https://github.com/gabrielweyer/dotnet-decode-jwt
- Owner: gabrielweyer
- License: mit
- Created: 2018-06-09T04:33:17.000Z (over 6 years ago)
- Default Branch: main
- Last Pushed: 2024-10-12T09:26:48.000Z (4 months ago)
- Last Synced: 2024-10-15T03:10:33.407Z (4 months ago)
- Topics: dotnet, dotnet-global-tools, github-actions, jwt, nuget
- Language: C#
- Homepage:
- Size: 376 KB
- Stars: 7
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# Decode JWT
`.NET` [global tool][dotnet-global-tools] to decode `JSON Web Token` claims.
| Package | Release |
| ------------------- | ------------------------------------------------------ |
| `dotnet-decode-jwt` | [![NuGet][nuget-package-badge]][nuget-package-command] || CI | Status | Platform(s) | Framework(s) |
| ------------------------ | -------------------------------------------------------- | ----------- | ---------------- |
| [GitHub][github-actions] | [![Build Status][github-actions-shield]][github-actions] | `Ubuntu` | `net6.0, net8.0` |![Sample output](docs/sample-output.png)
## Installation
```posh
> dotnet tool install -g dotnet-decode-jwt
```## Usage
```powershell
> dotnet decode-jwt eyJhbGciOiJub25lIn0.ewogICAgImlzcyI6ICJiZXN0LWlzc3VlciIsCiAgICAic3ViIjogIm5pY2Utc3ViamVjdCIsCiAgICAiYXVkIjogWyJhdWRpZW5jZS1vbmUiLCAiYXVkaWVuY2UtdHdvIl0sCiAgICAiZXhwIjogMTUyODY5MTM1MCwKICAgICJuYmYiOiAxNTI4NjkwNzUwLAogICAgImlhdCI6IDE1Mjg2OTA3NTAsCiAgICAianRpIjogImMzMTk3ZGNiLWUxMTMtNDc3OC04OTc5LWI5NTZmNjg0MDA3ZiIsCiAgICAiaHR0cDovL3NjaGVtYXMueG1sc29hcC5vcmcvd3MvMjAwNS8wNS9pZGVudGl0eS9jbGFpbXMvZW1haWxhZGRyZXNzIjogImhpQG1lLmNvbSIsCiAgICAic29tZS1udW1iZXIiOiAxMi41NiwKICAgICJuZXN0ZWQtY2xhaW0iOiB7CiAgICAgICAgImhpIjogIkknbSIsCiAgICAgICAgImEiOiAibmVzdGVkIGNsYWltIgogICAgfQp9Cg==.Expiration Time (exp): Monday, 11 June 2018 04:29:10 UTC / Monday, 11 June 2018 14:29:10 (UTC+10:00) Canberra, Melbourne, Sydney
Not Before (nbf): Monday, 11 June 2018 04:19:10 UTC / Monday, 11 June 2018 14:19:10 (UTC+10:00) Canberra, Melbourne, Sydney
Issued At (iat): Monday, 11 June 2018 04:19:10 UTC / Monday, 11 June 2018 14:19:10 (UTC+10:00) Canberra, Melbourne, SydneyClaims are:
{
"iss": "best-issuer",
"sub": "nice-subject",
"aud": [
"audience-one",
"audience-two"
],
"exp": 1528691350,
"nbf": 1528690750,
"iat": 1528690750,
"jti": "c3197dcb-e113-4778-8979-b956f684007f",
"http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress": "[email protected]",
"some-number": 12.56,
"nested-claim": {
"hi": "I'm",
"a": "nested claim"
}
}
```[nuget-package-badge]: https://img.shields.io/nuget/v/dotnet-decode-jwt.svg?label=NuGet&style=flat-square
[nuget-package-command]: https://www.nuget.org/packages/dotnet-decode-jwt
[dotnet-global-tools]: https://docs.microsoft.com/en-us/dotnet/core/tools/global-tools
[github-actions]: https://github.com/gabrielweyer/dotnet-decode-jwt/actions/workflows/build.yml
[github-actions-shield]: https://github.com/gabrielweyer/dotnet-decode-jwt/actions/workflows/build.yml/badge.svg