MCPcopy Index your code
hub / github.com/ChrisFeldmeier/OpenCodeRust / get_api_key

Method get_api_key

crates/opencode-provider/src/auth.rs:119–125  ·  view source on GitHub ↗
(&self, provider_id: &str)

Source from the content-addressed store, hash-verified

117 }
118
119 pub async fn get_api_key(&self, provider_id: &str) -> Option<String> {
120 let creds = self.credentials.read().await;
121 match creds.get(provider_id) {
122 Some(AuthInfo::Api { key }) => Some(key.clone()),
123 _ => None,
124 }
125 }
126
127 pub async fn get_oauth_token(&self, provider_id: &str) -> Option<String> {
128 let creds = self.credentials.read().await;

Callers

nothing calls this directly

Calls 3

readMethod · 0.80
getMethod · 0.45
cloneMethod · 0.45

Tested by

no test coverage detected