Crate torii_core

Source
Expand description

Core functionality for the torii project

This module contains the core functionality for the torii project.

It includes the core user and session structs, as well as the service and repository architecture.

The core module is designed to be used as a dependency for authentication services and storage backends.

See User for the core user struct, Session for the core session struct, and RepositoryProvider for the storage abstraction.

Re-exports§

pub use error::Error;
pub use repositories::RepositoryProvider;
pub use services::MagicLinkService;
pub use services::OAuthService;
pub use services::PasskeyService;
pub use services::PasswordResetService;
pub use services::PasswordService;
pub use services::SessionService;
pub use services::UserService;
pub use session::JwtAlgorithm;
pub use session::JwtClaims;
pub use session::JwtConfig;
pub use session::JwtMetadata;
pub use session::JwtSessionProvider;
pub use session::OpaqueSessionProvider;
pub use session::Session;
pub use session::SessionProvider;
pub use session::SessionToken;
pub use storage::NewUser;
pub use storage::SessionStorage;
pub use storage::UserStorage;
pub use user::DefaultUserManager;
pub use user::OAuthAccount;
pub use user::User;
pub use user::UserId;
pub use user::UserManager;

Modules§

error
events
id
ID generation utilities with prefix support
repositories
Repository traits for data access layer
services
Service layer for business logic
session
Session management
storage
user
User management and authentication
validation

Macros§

map_storage_err
Macro to convert any error to a storage database error
map_storage_err_with_context
Macro to convert any error to a storage database error with context