- ids::new_uuid():uuid v4(36 位带连字符) - session::SessionStore:Arc<std::sync::RwLock<HashMap>> 内存 token 表 - token = "lite-" + md5(account+毫秒+随机),总长 37 - resolve:bearer 前缀大小写不敏感;不命中则整串当裸 token 查 - state::AppState:config/db/sessions 三个 Arc - lib.rs:加一行 pub mod state; Co-Authored-By: Claude Sonnet 5.5 <[email protected]>