MCPcopy
hub / github.com/opentrace/opentrace / load_tokens

Function load_tokens

agent/src/opentrace_agent/cli/credentials.py:226–231  ·  view source on GitHub ↗

Load saved OAuth tokens, or *None* if not logged in.

()

Source from the content-addressed store, hash-verified

224
225
226def load_tokens() -> dict[str, Any] | None:
227 """Load saved OAuth tokens, or *None* if not logged in."""
228 data = _read_encrypted(_base_dir() / "auth.json")
229 if data and "access_token" in data:
230 return data
231 return None
232
233
234def save_tokens(tokens: dict[str, Any]) -> None:

Callers 5

refreshFunction · 0.90
resolve_org_tokenFunction · 0.90
get_api_tokenFunction · 0.90
loginFunction · 0.85
whoamiFunction · 0.85

Calls 2

_read_encryptedFunction · 0.85
_base_dirFunction · 0.85

Tested by

no test coverage detected