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 std::{
17 collections::HashMap,
18 time::{SystemTime, UNIX_EPOCH},
19};
20
21#[cfg(test)]
22use serde_json::json;
23use {
24 jsonwebtoken::{
25 Algorithm, DecodingKey, EncodingKey, Header, TokenData, Validation, decode, encode,
26 },
27 serde::{Deserialize, Serialize},
28 serde_json::Value,
29};