Skip to content

Commit f1346b0

Browse files
committed
implement add headers to tf provider
1 parent 22a4681 commit f1346b0

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/databricks/sql/auth/token_federation.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,14 @@ def _exchange_token(self, access_token: str) -> Token:
314314

315315
return Token(new_access_token, token_type, refresh_token, expiry)
316316

317+
def add_headers(self, request_headers: Dict[str, str]):
318+
"""
319+
Add authentication headers to the request.
320+
"""
321+
headers = self.get_auth_headers()
322+
for k, v in headers.items():
323+
request_headers[k] = v
324+
317325

318326
class SimpleCredentialsProvider(CredentialsProvider):
319327
"""A simple credentials provider that returns a fixed token."""

0 commit comments

Comments
 (0)