cataclysm_jwt/jwt.rs
1use std::collections::HashMap;
2
3#[derive(Debug)]
4/// # Usage
5///
6/// Simple struct to store a JWT in the most generic format possible.
7/// A problem with other crates is that it asks that you know JWT fields prior to interacting with the server.
8/// This implementation gives full control to the server implementer. They will have to validate every field of interest on their own, incluiding if such fields exists or not
9/// and act accordingly.
10///
11pub struct JWT {
12 /// Header hashmap
13 pub header: HashMap<String,String>,
14 /// Payload hashmap
15 pub payload: HashMap<String,String>,
16 /// signature b64 encoded
17 pub signature: String,
18 /// Original jwt
19 pub raw_jwt: String
20}