pub struct JWT {
pub header: HashMap<String, String>,
pub payload: HashMap<String, String>,
pub signature: String,
pub raw_jwt: String,
}Expand description
§Usage
Simple struct to store a JWT in the most generic format possible. A problem with other crates is that it asks that you know JWT fields prior to interacting with the server. 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 and act accordingly.
Fields§
§header: HashMap<String, String>Header hashmap
payload: HashMap<String, String>Payload hashmap
signature: Stringsignature b64 encoded
raw_jwt: StringOriginal jwt
Trait Implementations§
Auto Trait Implementations§
impl Freeze for JWT
impl RefUnwindSafe for JWT
impl Send for JWT
impl Sync for JWT
impl Unpin for JWT
impl UnsafeUnpin for JWT
impl UnwindSafe for JWT
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more