Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 10 additions & 12 deletions src/finch/_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,12 +216,11 @@ def qs(self) -> Querystring:
return Querystring(array_format="brackets")

@override
def auth_headers(self) -> dict[str, str]:
if self._bearer_auth:
return self._bearer_auth
if self._basic_auth:
return self._basic_auth
return {}
def _auth_headers(self, security: SecurityOptions) -> dict[str, str]:
return {
**(self._bearer_auth if security.get("bearer_auth", False) else {}),
**(self._basic_auth if security.get("basic_auth", False) else {}),
}

@property
def _bearer_auth(self) -> dict[str, str]:
Expand Down Expand Up @@ -567,12 +566,11 @@ def qs(self) -> Querystring:
return Querystring(array_format="brackets")

@override
def auth_headers(self) -> dict[str, str]:
if self._bearer_auth:
return self._bearer_auth
if self._basic_auth:
return self._basic_auth
return {}
def _auth_headers(self, security: SecurityOptions) -> dict[str, str]:
return {
**(self._bearer_auth if security.get("bearer_auth", False) else {}),
**(self._basic_auth if security.get("basic_auth", False) else {}),
}

@property
def _bearer_auth(self) -> dict[str, str]:
Expand Down
Loading