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

Function update_tokens

crates/opencode-mcp/src/auth.rs:120–128  ·  view source on GitHub ↗

Update only the tokens portion of an entry.

(
    mcp_name: &str,
    tokens: OAuthTokens,
    server_url: Option<&str>,
)

Source from the content-addressed store, hash-verified

118
119/// Update only the tokens portion of an entry.
120pub async fn update_tokens(
121 mcp_name: &str,
122 tokens: OAuthTokens,
123 server_url: Option<&str>,
124) -> Result<(), std::io::Error> {
125 let mut entry = get(mcp_name).await.unwrap_or_default();
126 entry.tokens = Some(tokens);
127 set(mcp_name, entry, server_url).await
128}
129
130/// Update only the client info portion of an entry.
131pub async fn update_client_info(

Callers 1

save_token_resultMethod · 0.85

Calls 2

setFunction · 0.85
getFunction · 0.70

Tested by

no test coverage detected