Skip to main content

Module token

Module token 

Source
Expand description

Token 管理模块

Re-exports§

pub use generator::TokenGenerator;
pub use generator::generate_unique;
pub use jwt::JwtAlgorithm;
pub use jwt::JwtClaims;
pub use jwt::JwtManager;
pub use validator::TokenValidator;

Modules§

generator
Token Generator | Token 生成器
jwt
JWT (JSON Web Token) Module | JWT (JSON Web Token) 模块
map
Token → login_id mapping markers. Token → login_id 映射标记。
validator
Token 验证器

Structs§

TokenInfo
Token 信息 | Token Information
TokenSign
Token 签名
TokenValue
Token 字节在请求内会被 TokenInfo / 上下文多次 Clone;用 Arc 避免复制。 Token bytes are cloned across TokenInfo and request context; Arc avoids copying.

Functions§

intern_login_type
默认账号体系字符串只 intern 一次。这是 OnceLock 的正确用途(常量),不是替代 Arc。 Intern the default login-type string once. A legitimate OnceLock use (a constant), not an Arc replacement.