Skip to content

Latest commit

 

History

History
52 lines (38 loc) · 1015 Bytes

readme.md

File metadata and controls

52 lines (38 loc) · 1015 Bytes

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" }