- Introduced `RepositoryError` and `ServiceError` enums in both IAM and CMS domains for better error management. - Updated domain traits and services to return specific error types instead of `anyhow::Result`. - Enhanced session and OAuth repository implementations to handle errors more explicitly. - Refactored session service methods to return `Result<T, ServiceError>` for improved error handling. - Updated HTTP handlers to utilize the new error types. - Modified password hashing functions to run in a blocking context using `tokio::task::spawn_blocking`. - Added tests for new error handling mechanisms and async password functions.
19 lines
630 B
Rust
19 lines
630 B
Rust
//! Domain layer for IAM (Identity & Access Management).
|
|
//!
|
|
//! Pure entities, repository traits, and service traits — no infrastructure
|
|
//! or application orchestration logic.
|
|
//!
|
|
//! # Sub-modules
|
|
//!
|
|
//! - [`oauth`] — `OAuthConfig`, `OAuthToken` entities
|
|
//! - [`repository`] — Trait definitions: `OAuthRepository`, `SessionRepository`,
|
|
//! `SessionLockRepository`, `Rng`
|
|
//! - [`service`] — Trait definitions: `OAuthService`, `SessionService`
|
|
//! - [`session`] — `Session` entity (IAM wrapper around `zesdex_entities::Session`)
|
|
|
|
pub mod error;
|
|
pub mod oauth;
|
|
pub mod repository;
|
|
pub mod service;
|
|
pub mod session;
|