Expand description
API key authentication with Argon2 password hashing.
Keys are stored as Argon2 hashes. Each key has a name, optional expiry, and optional role. Multiple keys can be valid simultaneously for rotation.
§Example
use chronix_security::auth::api_key::ApiKeyStore;
let mut store = ApiKeyStore::new();
let raw_key = store.create_key("admin", None).unwrap();
assert!(store.validate(&raw_key).is_ok());Structs§
- ApiKey
Entry - A stored API key entry with metadata.
- ApiKey
Store - In-memory store for API keys with Argon2 hashing.