Crates.io | jwt-decoder |
lib.rs | jwt-decoder |
version | 0.2.1 |
source | src |
created_at | 2019-03-17 22:39:40.799921 |
updated_at | 2019-03-17 23:27:43.816361 |
description | A small command line utility to parse out json web token. |
homepage | |
repository | |
max_upload_size | |
id | 121678 |
size | 17,249 |
This is a simple rust program that decodes a json web token.
You can read more about JWTs in RFC 7519
To build the project you need to run cargo build
You can run the program by issuing a command like this:
cargo run $(go run generate_token.go)
The part $()
is command substitution in bash and essentially executes a little go program that I wrote that creates a JWT that is deserialized into the type specified in src/main.rs
If you don't have GO installed then you can simply run this in the command line:
cargo run eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJCYWRhc3NlcyIsImV4cCI6MTMwMDgxOTM4MCwiaWF0IjoxMzAwODE5MzgyLCJpc3MiOiJKb2huIFJhbWJvIiwianRpIjoib25lUmFuZG9tZVN0cmluZzEyMzQ1NiIsIm5iZiI6MTMwMDgxOTM4MSwic3ViIjoiTHVrZSBDYWdlIn0.7DtGRRz6YGc8hKr8o8ll6cIx7MRhyQTWpAgxz25cxyw
which is the JWT that the go program generates