Expand description
Authentication Framework
Provides user authentication, password hashing, and multi-factor authentication.
§Features
- PBKDF2-HMAC-SHA256 password hashing with configurable iterations
- Password complexity enforcement via configurable policy
- Password history tracking (prevent reuse of last N passwords)
- Account expiration with timestamp-based checks
- Multi-factor authentication (TOTP-like)
- Account lockout after configurable failed attempts
§No-Heap Design
All data structures use fixed-size stack/static buffers to avoid heap allocations during boot. This prevents corruption of the bump allocator on architectures (e.g., RISC-V) where the heap is not yet fully initialized when the auth module runs.
Structs§
- Auth
Manager - Authentication manager
- Credential
- User credential
- Password
Policy - Password complexity enforcement policy.
- User
Account - User account information (fixed-size, no heap allocation).
Enums§
- Auth
Result - Authentication result
Functions§
- get_
auth_ manager - Get global authentication manager
- init
- Initialize authentication framework
- validate_
password - Validate a password against the default policy (convenience function).
Type Aliases§
- UserId
- User identifier