MCPcopy Create free account
hub / github.com/google/adk-python / auth_headers

Function auth_headers

tests/remote/triggers/conftest.py:157–169  ·  view source on GitHub ↗

Authorization headers for direct HTTP calls to Cloud Run.

(cloud_run_url)

Source from the content-addressed store, hash-verified

155
156@pytest.fixture(scope="session")
157def auth_headers(cloud_run_url) -> dict[str, str]:
158 """Authorization headers for direct HTTP calls to Cloud Run."""
159 try:
160 resp = requests.get(cloud_run_url, timeout=10)
161 if resp.status_code != 403:
162 return {}
163 except requests.RequestException:
164 pass
165
166 token = _get_identity_token(cloud_run_url)
167 if token:
168 return {"Authorization": f"Bearer {token}"}
169 return {}

Callers

nothing calls this directly

Calls 2

_get_identity_tokenFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected