Skip to content

Commit 33d3232

Browse files
committed
Docs: Clarify Proto3 repeated field presence checks in AuthInterceptor
1 parent 30685cf commit 33d3232

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/a2a/client/auth/interceptor.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ async def intercept(
2626
context: ClientCallContext | None,
2727
) -> tuple[dict[str, Any], dict[str, Any]]:
2828
"""Applies authentication headers to the request if credentials are available."""
29+
# Proto3 repeated fields (security) and maps (security_schemes) do not track presence.
30+
# HasField() raises ValueError for them.
31+
# We check for truthiness to see if they are non-empty.
2932
if (
3033
agent_card is None
3134
or not agent_card.security

0 commit comments

Comments
 (0)