1
0
mirror of synced 2025-12-30 21:02:43 -05:00
Files
airbyte/airbyte-integrations/connectors/source-pipedrive/source_pipedrive/auth.py
Serhii Chvaliuk bd6e743abf Source Pipedrive: promote to cloud (#23539)
Signed-off-by: Sergey Chvalyuk <grubberr@gmail.com>
2023-03-01 19:35:42 +02:00

20 lines
464 B
Python

#
# Copyright (c) 2023 Airbyte, Inc., all rights reserved.
#
from requests.auth import AuthBase
class QueryStringTokenAuthenticator(AuthBase):
"""
Authenticator that attaches a set of query string parameters (e.g. an API key) to the request.
"""
def __init__(self, **kwargs):
self.params = kwargs
def __call__(self, request):
if self.params:
request.prepare_url(request.url, self.params)
return request