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    DisplayName, Email, LoginIdentifier, Password, RoleId, SessionId, Tenant, TenantAuthPolicy,
26    TenantId, TenantSettings, User, UserId, UserStatus, Username,
27};
28pub use error::{AuthError, NythosResult};
29pub use ports::{
30    NewUser, PasswordHasher, RefreshTokenRotation, RevocationChecker, RoleAssignmentInput,
31    RoleRepository, SessionRecord, SessionStore, TenantPolicyPort, TokenSigner, UserCredentials,
32    UserRepository,
33};
34pub use rbac::{Permission, Role, RoleAssignment, RoleRegistry};
35pub use session::{RefreshToken, Session};