Skip to content

Commit 8a2045e

Browse files
committed
fix(client): revert "send all configured auth headers"
This reverts commit 861ed75.
1 parent f0a48c8 commit 8a2045e

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/finch/_client.py

+10-2
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,11 @@ def qs(self) -> Querystring:
147147
@property
148148
@override
149149
def auth_headers(self) -> dict[str, str]:
150-
return {**self._bearer_auth, **self._basic_auth}
150+
if self._bearer_auth:
151+
return self._bearer_auth
152+
if self._basic_auth:
153+
return self._basic_auth
154+
return {}
151155

152156
@property
153157
def _bearer_auth(self) -> dict[str, str]:
@@ -451,7 +455,11 @@ def qs(self) -> Querystring:
451455
@property
452456
@override
453457
def auth_headers(self) -> dict[str, str]:
454-
return {**self._bearer_auth, **self._basic_auth}
458+
if self._bearer_auth:
459+
return self._bearer_auth
460+
if self._basic_auth:
461+
return self._basic_auth
462+
return {}
455463

456464
@property
457465
def _bearer_auth(self) -> dict[str, str]:

0 commit comments

Comments
 (0)