Hari Haran R
08/23/2025, 5:55 AMkapa.ai
08/23/2025, 5:56 AMHttpAuthenticator class. Here’s a high-level approach, based on an official example from the Airbyte community: 1. Create a custom authenticator that handles the login process, stores the cookies, and attaches them to subsequent requests. 2. Pass your custom authenticator to your stream classes. Below is a sample implementation: python from airbyte_cdk.sources.streams.http.auth import HttpAuthenticator import requests from urllib.parse import urljoin class CookieAuthenticator(HttpAuthenticator): def __init__(self, config): self.url_base = config["url_base"] self.cookie_jar = self.login(config["username"], config["password"]) def login(self, username, password): login_body = { "name": username, "password": password } login_url = urljoin(self.url_base, "authenticatedSession") resp = requests.post(url=login_url, json=login_body) resp.raise_for_status() return resp.cookies def get_auth_header(self): # Convert cookies to header format return {"cookie": "; ".join([f"{k}={v}" for k, v in requests.utils.dict_from_cookiejar(self.cookie_jar).items()])} You would then use this authenticator in your stream: python cookie_authenticator = CookieAuthenticator(config) custom_api_stream = CustomApiStream(config, authenticator=cookie_authenticator) This approach keeps your authentication logic clean and follows Airbyte CDK best practices. You can adapt the login logic to match Acumatica’s specific authentication endpoint and payload requirements. For more details and the original discussion, see the [Airbyte forum post on cookie-based authentication](https://discuss.airbyte.io/t/549)<source>https://discuss.airbyte.io/t/549</source>. If you need more information on general connector development with the Python CDK, refer to the [Airbyte connector development documentation](https://docs.airbyte.com/platform/connector-development#connector-development-options)<source>https://docs.airbyte.com/platform/connector-development#connector-development-options</source>. Let me know if you need further guidance!