Skip to main content

nythos_core/
lib.rs

1#![allow(async_fn_in_trait)]
2//!
3//! Public core library for Nythos.
4//!
5//! `nythos-core` contains implemented domain models, orchestration services,
6//! and trait contracts only.
7//! It intentionally excludes HTTP, storage drivers, and other infrastructure.
8//! The crate root re-exports the main public surface, with grouped access also
9//! available under `auth`, `domain`, `ports`, `rbac`, `session`, and `error`.
10
11pub mod auth;
12pub mod domain;
13pub mod error;
14pub mod ports;
15pub mod rbac;
16pub mod session;
17
18pub use auth::{
19    AccessToken, Claims, LoginAuthMaterial, LoginInput, LoginService, PasswordHash,
20    RefreshAuthMaterial, RefreshInput, RefreshService, RegisterAuthMaterial, RegisterInput,
21    RegisterResult, RegisterService, RevokeAllSessionsInput, RevokeAllSessionsService,
22    RevokeResult, RevokeSessionInput, RevokeSessionService, TokenPurpose,
23};
24pub use domain::{
25    Email, Password, RoleId, SessionId, Tenant, TenantId, TenantSettings, User, UserId, UserStatus,
26};
27pub use error::{AuthError, NythosResult};
28pub use ports::{
29    NewUser, PasswordHasher, RefreshTokenRotation, RevocationChecker, RoleAssignmentInput,
30    RoleRepository, SessionRecord, SessionStore, TokenSigner, UserCredentials, UserRepository,
31};
32pub use rbac::{Permission, Role, RoleAssignment, RoleRegistry};
33pub use session::{RefreshToken, Session};