dsp_cli/model/auth.rs
1//! Authentication domain shapes — shared across the client → action boundary.
2//!
3//! Types here are the dsp-cli vocabulary for auth data. DSP-API wire types
4//! (e.g. `LoginApiResponse`) live inside `src/client/http.rs` and are never
5//! exposed above the client layer. See ADR-0001 and ADR-0008.
6
7/// The result of a successful login call, expressed in dsp-cli vocabulary.
8///
9/// `Clone` is derived so `MockDspClient` can hand out `Result<LoginResponse, Diagnostic>`
10/// values repeatedly without consuming them.
11#[derive(Debug, Clone)]
12pub struct LoginResponse {
13 pub token: String,
14 pub user: String,
15 pub expires_at: Option<chrono::DateTime<chrono::Utc>>,
16}