fix(clients): express endpoints are key-only; has_oauth covers service accounts; make google-live

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-24 08:32:55 +02:00
co-authored by Claude Sonnet 5.5
parent 38687de58f
commit 316ddfdb69
10 changed files with 38 additions and 11 deletions
+5
View File
@@ -76,6 +76,11 @@ std::shared_ptr<clients::Auth> Credentials::api_key_from_env(const char* name) {
return api_key(std::move(key));
}
bool Credentials::has_oauth() {
return !env("GOOGLE_ACCESS_TOKEN").empty() || !env("GOOGLE_ACCESS_TOKEN_FILE").empty() ||
!env("GOOGLE_APPLICATION_CREDENTIALS").empty();
}
std::shared_ptr<clients::Auth> Credentials::oauth_from_env() {
std::string token = env("GOOGLE_ACCESS_TOKEN");
if (!token.empty()) return bearer(std::move(token));