A simple library for generating and parsing JWT tokens using HMAC SHA256 as per https://jwt.io/introduction
```rust use jwt_hmac; use serde::Serialize;
struct Claims{ sub: String, name: String, admin: bool }
fn main(){ let secret = "I'm a secret".asbytes(); let claims = Claims{ sub: "1234567890".tostring(), name: "John Doe".tostring(), admin: true }; match jwthmac::create(secret, &claims) { Ok(token) => println!("Token: {}", token), Err(error) => println!("This can't be happening {}", error) } } ```
```rust use jwt_hmac; use serde::Deserialize;
struct Claims{ sub: String }
fn main(){
let secret = "I'm a secret".asbytes();
match jwthmac::parse::
As illustrated in the examples above you can fill your claims with bloat for the client and have the back end only extract the useful bits when parsing.