Skip to content

Commit 861ed75

Browse files
fix(client): send all configured auth headers (#643)
1 parent cbe0d44 commit 861ed75

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

src/finch/_client.py

+2-10
Original file line numberDiff line numberDiff line change
@@ -145,11 +145,7 @@ def qs(self) -> Querystring:
145145
@property
146146
@override
147147
def auth_headers(self) -> dict[str, str]:
148-
if self._bearer_auth:
149-
return self._bearer_auth
150-
if self._basic_auth:
151-
return self._basic_auth
152-
return {}
148+
return {**self._bearer_auth, **self._basic_auth}
153149

154150
@property
155151
def _bearer_auth(self) -> dict[str, str]:
@@ -387,11 +383,7 @@ def qs(self) -> Querystring:
387383
@property
388384
@override
389385
def auth_headers(self) -> dict[str, str]:
390-
if self._bearer_auth:
391-
return self._bearer_auth
392-
if self._basic_auth:
393-
return self._basic_auth
394-
return {}
386+
return {**self._bearer_auth, **self._basic_auth}
395387

396388
@property
397389
def _bearer_auth(self) -> dict[str, str]:

0 commit comments

Comments
 (0)