Files
pruefwerk/compliance-core/src/models/auth.rs
T
sharang 96d97ae6eb
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 3s
CI / Deploy Docs (push) Skipped
CI / Deploy MCP (push) Successful in 4m24s
CI / Deploy Dashboard (push) Successful in 6m0s
CI / Deploy Agent (push) Successful in 7m22s
feat(support): BreakPilot support can open any tenant, attributed and audited (#425)
2026-09-29 07:37:12 +00:00

38 lines
1.3 KiB
Rust

use serde::{Deserialize, Serialize};
/// Authentication state returned by the `check_auth` server function.
///
/// When no valid session exists, `authenticated` is `false` and all
/// other fields are empty strings.
#[derive(Debug, Clone, Serialize, Deserialize, Default, PartialEq)]
pub struct AuthInfo {
pub authenticated: bool,
pub sub: String,
pub email: String,
pub name: String,
pub avatar_url: String,
/// The link back to the platform portal (the workspace's dashboard
/// there); empty when no portal is configured.
#[serde(default)]
pub portal_url: String,
/// The docs site this deployment links to from the sidebar.
#[serde(default)]
pub docs_url: String,
/// Holds a BreakPilot support role, so may open any tenant.
#[serde(default)]
pub staff: bool,
/// The customer tenant support has opened; `None` for everyone else and
/// for support before choosing one.
#[serde(default)]
pub support_tenant: Option<SupportTenant>,
}
/// A customer tenant opened by BreakPilot support.
#[derive(Debug, Clone, Serialize, Deserialize, Default, PartialEq, Eq)]
pub struct SupportTenant {
/// The registry's tenant id, sent to the agent with every request.
pub id: String,
pub slug: String,
pub name: String,
}