Skip to content

snamber/jwt-decode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JWT-Decode

Build Status

JWT-Decode is a json web token decoder

Installation

Get the tool via

go get github.com/snamber/jwt-decode

Usage

Use either by piping a token into jwt-decode

echo eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1MjMwOTg2MTMsIk5hbWUiOiJ0ZXN0IiwiS2luZCI6MH0.moBp8MqKCi | jwt-decode

or by specifying the token as command line parameter

jwt-decode -token eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1MjMwOTg2MTMsIk5hbWUiOiJ0ZXN0IiwiS2luZCI6MH0.moBp8MqKCi

both will print the following

{ "alg": "RS256", "typ": "JWT" } { "Kind": 0, "Name": "test", "exp": 1.523098613e+09 }

Use the flag -datetime to print the exp expiration date in datetime format:

{ "alg": "RS256", "typ": "JWT" } { "Kind": 0, "Name": "test", "exp": "2018-04-07T12:56:53+02:00" }

About

A JSON Web Token Decoder

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages