- auth: register/login/refresh/logout w/ JWT+Argon2, protected mutations - domain: User, RefreshSession, auth ports, Unauthorized/Forbidden errors - presentation: context/state/factory/errors/extractors/openapi modules - routes behind /api, SPA served from root w/ fallback - OpenAPI Scalar at /docs - frontend ssr:false, single-binary Dockerfile
18 lines
336 B
Rust
18 lines
336 B
Rust
use chrono::{DateTime, Utc};
|
|
use uuid::Uuid;
|
|
|
|
use crate::value_objects::UserId;
|
|
|
|
pub struct GeneratedToken {
|
|
pub token: String,
|
|
pub expires_at: DateTime<Utc>,
|
|
}
|
|
|
|
pub struct RefreshSession {
|
|
pub id: Uuid,
|
|
pub user_id: UserId,
|
|
pub token: String,
|
|
pub expires_at: DateTime<Utc>,
|
|
pub created_at: DateTime<Utc>,
|
|
}
|