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

Method auth_status

crates/opencode-mcp/src/oauth.rs:343–352  ·  view source on GitHub ↗

Authentication status.

(&self)

Source from the content-addressed store, hash-verified

341
342 /// Authentication status.
343 pub async fn auth_status(&self) -> AuthStatus {
344 match auth::get_for_url(&self.mcp_name, &self.server_url).await {
345 Some(entry) => match auth::is_token_expired(&entry) {
346 Some(true) => AuthStatus::Expired,
347 Some(false) => AuthStatus::Authenticated,
348 None => AuthStatus::NotAuthenticated,
349 },
350 None => AuthStatus::NotAuthenticated,
351 }
352 }
353
354 pub fn mcp_name(&self) -> &str {
355 &self.mcp_name

Callers

nothing calls this directly

Calls 2

get_for_urlFunction · 0.85
is_token_expiredFunction · 0.85

Tested by

no test coverage detected