Skip to main content

Module storage

Module storage 

Source
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:

BackendFeature flagModule
In-memory (HashMap)(always available)[memory]
In-memory (DashMap)(always available)[dashmap_memory]
Redisredis-storage[redis]
PostgreSQLpostgres-storage[postgres]
MySQLmysql-storage[mysql]
SQLitesqlite-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