jwt_service/
lib.rs

1//! A high-performance async library for JWT (JSON Web Token) authentication and authorization.
2//! Supports token generation, validation, and custom claims with optimized memory usage,
3//! ideal for HTTP clients/servers and web applications.
4
5mod r#const;
6mod r#enum;
7mod r#impl;
8mod r#struct;
9#[cfg(test)]
10mod test;
11
12pub use {r#enum::*, r#struct::*};
13
14use r#const::*;
15
16use serde::{Deserialize, Serialize};
17use serde_json::Value;
18use std::{
19    collections::HashMap,
20    time::{SystemTime, UNIX_EPOCH},
21};
22
23use jsonwebtoken::{
24    Algorithm, DecodingKey, EncodingKey, Header, TokenData, Validation, decode, encode,
25};
26
27#[cfg(test)]
28use serde_json::json;