Skip to main content

qubit_fs/provider/
credential_ref.rs

1/*******************************************************************************
2 *
3 *    Copyright (c) 2026 Haixing Hu.
4 *
5 *    SPDX-License-Identifier: Apache-2.0
6 *
7 *    Licensed under the Apache License, Version 2.0.
8 *
9 ******************************************************************************/
10//! Credential references used by provider configuration.
11
12/// Reference to credentials without storing secret values.
13#[derive(Clone, Debug, Eq, PartialEq)]
14pub enum CredentialRef {
15    /// Use the provider's default credential chain.
16    DefaultChain,
17    /// Use a named credential profile.
18    Profile(String),
19    /// Read credentials from named environment variables.
20    Environment {
21        /// Environment variable containing the access key or username.
22        access_key: String,
23        /// Environment variable containing the secret key or password.
24        secret_key: String,
25    },
26    /// Use an external credential provider id.
27    Provider(String),
28}