aidputils.agents.tools.http.http_auth¶
HTTP Tool auth helper.
This module uses the shared auth strategies under aidputils.agents.auth.strategy to HttpTool needs:
Producing auth headers when applicable (Bearer/OAuth/NoAuth)
HttpTool intentionally bypasses template/header validation for auth headers returned by strategies, since templating explicitly disallows sensitive headers like Authorization.
- aidputils.agents.tools.http.http_auth.build_auth_for_http(auth: dict | None) Tuple[Dict[str, str], Any | None, str][source]¶
Build auth headers and/or signer for HttpTool.
- Parameters:
auth – Tool configuration dict. Expected shape: {“authType”: “NO_AUTH”|”BEARER_TOKEN”|”OAUTH”, …}
- Returns:
auth_headers: headers to merge into request headers
signer: optional signer object for GenericRestClient
auth_type: normalized auth type string (for metrics/logging)
- Return type:
(auth_headers, signer, auth_type) where