MCPcopy Create free account
hub / github.com/Work-Fisher/code-claw / read_api_key

Function read_api_key

claw-code/rust/crates/api/src/client.rs:495–501  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

493
494#[cfg(test)]
495fn read_api_key() -> Result<String, ApiError> {
496 let auth = AuthSource::from_env_or_saved()?;
497 auth.api_key()
498 .or_else(|| auth.bearer_token())
499 .map(ToOwned::to_owned)
500 .ok_or(ApiError::MissingApiKey)
501}
502
503#[cfg(test)]
504fn read_auth_token() -> Option<String> {

Calls 2

api_keyMethod · 0.80
bearer_tokenMethod · 0.80