MCPcopy Create free account
hub / github.com/ChrisFeldmeier/OpenCodeRust / AuthInfo

Enum AuthInfo

crates/opencode-provider/src/auth.rs:9–30  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7#[derive(Debug, Clone, Serialize, Deserialize)]
8#[serde(tag = "type")]
9pub enum AuthInfo {
10 #[serde(rename = "api")]
11 Api { key: String },
12 #[serde(rename = "oauth")]
13 OAuth {
14 access: String,
15 #[serde(default)]
16 refresh: String,
17 expires: Option<i64>,
18 #[serde(alias = "accountId")]
19 account_id: Option<String>,
20 #[serde(alias = "enterpriseUrl")]
21 enterprise_url: Option<String>,
22 },
23 #[serde(rename = "wellknown")]
24 WellKnown {
25 /// Environment variable name to set with the token
26 key: String,
27 /// The authentication token value
28 token: String,
29 },
30}
31
32#[derive(Debug, Clone, Serialize, Deserialize)]
33pub struct AuthMethod {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected