Skip to content

Releases: lmammino/jwtinfo

v0.4.4

27 Aug 10:25
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v0.4.3...v0.4.4

v0.4.3

07 Nov 21:46
Compare
Choose a tag to compare

What's Changed

Full Changelog: v0.4.2...v0.4.3

v0.4.2

26 Oct 14:31
Compare
Choose a tag to compare
  • Reverted to clap builder pattern to avoid typeid issues (Fixes #32)
  • Renamed master branch to main
  • Updated GitHub Actions

Full Changelog: v0.4.1...v0.4.2

v0.4.1

26 Oct 07:51
Compare
Choose a tag to compare
  • Updated clap to 4.4.7 (hopefully resolves #32)

Full Changelog: v0.4.0...v0.4.1

v0.4.0

11 Jul 15:31
0cb603c
Compare
Choose a tag to compare

What's Changed

  • Updates clap and base64, removes lazy_static by @lmammino in #31

Full Changelog: v0.3.0...v0.4.0

v0.3.0

13 Oct 20:18
Compare
Choose a tag to compare

v0.2.3

07 Oct 18:29
Compare
Choose a tag to compare
  • Added keywords in cargo.toml for greater discoverability on crates.io

v0.2.2

07 Oct 09:29
Compare
Choose a tag to compare
  • Improve tests and support every type that can be converted to string in jwt::parse (#28)
  • Improved install script (#21) - Thanks @timClicks!

v0.2.1

06 Oct 14:00
Compare
Choose a tag to compare
  • Removed all instances of "JWT Token(s)" from code and documentation, because... yes T in JWT already stands for Token!
  • Simplified code using expressions and pattern matching (#27)

v0.2.0

04 Oct 09:22
Compare
Choose a tag to compare
  • Allows displaying the header using the --header flag. The internal representation of the jwt::Token was changed to expose header and body as serde_json::Value types (rather than jwt::Header and str types). This offers more flexibility in handling arbitrary properties in both header and body (#24, #26).

CLI example

jwtinfo --header eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c

will print:

{"alg":"HS256","typ":"JWT"}

Library example

use jwtinfo::{jwt};

let token_str = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c";
let token = jwt::parse(token_str).unwrap();
assert_eq!(token.header.to_string(), "{\"alg\":\"HS256\",\"typ\":\"JWT\"}");
assert_eq!(token.body.to_string(), "{\"iat\":1516239022,\"name\":\"John Doe\",\"sub\":\"1234567890\"}");