futu_auth/lib.rs
1//! FutuOpenD-rs 授权子系统
2//!
3//! 提供 API Key + Scope + 限额 三层鉴权:
4//! - [`scope`] — 能力分组枚举
5//! - [`key`] — 单条 key 记录 + SHA-256 校验
6//! - [`store`] — keys.json 加载 / 原子热替换 / 明文验证
7//! - [`limits`] — 日累计 / 单笔上限 / 市场 / 品种白名单 / 时间窗口
8
9pub mod audit;
10pub mod key;
11pub mod limits;
12pub mod machine;
13pub mod metrics;
14pub mod scope;
15pub mod store;
16
17pub use key::{hash_plaintext, KeyRecord};
18pub use limits::{CheckCtx, LimitOutcome, Limits, RuntimeCounters};
19pub use machine::{fingerprint_for, fingerprint_from_raw, raw_machine_id, MachineError};
20pub use metrics::Registry as MetricsRegistry;
21pub use scope::{scope_for_proto_id, Scope, ScopeParseError};
22pub use store::{KeyStore, KeyStoreError};