Expand description
Storage backends and the AuthStorage trait.
See the trait documentation for available backends (Memory, PostgreSQL, MySQL, Redis, SQLite, Encrypted) and guidance on writing custom backends. Storage backends for the authentication framework.
This module provides the [AuthStorage] trait and multiple backend
implementations:
| Backend | Feature flag | Module |
|---|---|---|
| In-memory (HashMap) | (always available) | [memory] |
| In-memory (DashMap) | (always available) | [dashmap_memory] |
| Redis | redis-storage | [redis] |
| PostgreSQL | postgres-storage | [postgres] |
| MySQL | mysql-storage | [mysql] |
| SQLite | sqlite-storage | [sqlite] |
| AES-256-GCM encrypted wrapper | (always available) | [encryption] |
All backends implement [AuthStorage], so they can be used
interchangeably via dyn AuthStorage or generics.
Re-exports§
pub use encryption::EncryptedStorage;pub use encryption::StorageEncryption;pub use crate::storage::core::AuthStorage;pub use core::*;
Modules§
- core
- Storage backends for authentication data.
- dashmap_
memory - encryption
- memory
- postgres