microsandbox_types/registry.rs
1//! Registry authentication contracts shared by local and cloud clients.
2
3use serde::{Deserialize, Serialize};
4
5//--------------------------------------------------------------------------------------------------
6// Types
7//--------------------------------------------------------------------------------------------------
8
9/// Authentication credentials for OCI registry access.
10#[derive(Debug, Clone, Default, Serialize, Deserialize)]
11pub enum RegistryAuth {
12 /// No authentication. Works for public registries.
13 #[default]
14 Anonymous,
15 /// Username and password or token authentication.
16 Basic {
17 /// Registry username.
18 username: String,
19 /// Registry password or token.
20 password: String,
21 },
22}