diff --git a/airbyte-integrations/connectors/source-retently/source_retently/components.py b/airbyte-integrations/connectors/source-retently/source_retently/components.py deleted file mode 100644 index 064ca721a62d..000000000000 --- a/airbyte-integrations/connectors/source-retently/source_retently/components.py +++ /dev/null @@ -1,23 +0,0 @@ -# -# Copyright (c) 2023 Airbyte, Inc., all rights reserved. -# - -from dataclasses import dataclass -from typing import Any, Mapping - -from airbyte_cdk.sources.declarative.auth import DeclarativeOauth2Authenticator -from airbyte_cdk.sources.declarative.auth.declarative_authenticator import DeclarativeAuthenticator -from airbyte_cdk.sources.declarative.auth.token import ApiKeyAuthenticator - - -@dataclass -class AuthenticatorRetently(DeclarativeAuthenticator): - config: Mapping[str, Any] - api_auth: ApiKeyAuthenticator - oauth: DeclarativeOauth2Authenticator - - def __new__(cls, api_auth, oauth, config, *args, **kwargs): - if config["credentials"]["api_key"]: - return api_auth - else: - return oauth diff --git a/airbyte-integrations/connectors/source-retently/source_retently/manifest.yaml b/airbyte-integrations/connectors/source-retently/source_retently/manifest.yaml index 8a8a910691da..642f1c8e2ad2 100644 --- a/airbyte-integrations/connectors/source-retently/source_retently/manifest.yaml +++ b/airbyte-integrations/connectors/source-retently/source_retently/manifest.yaml @@ -28,9 +28,13 @@ definitions: url_base: "https://app.retently.com/api/v2/" http_method: "GET" authenticator: - class_name: source_retently.components.AuthenticatorRetently - api_auth: "#/definitions/api_authenticator" - oauth: "#/definitions/oauth_authenticator" + type: SelectiveAuthenticator + authenticator_selection_path: + - auth + - type + authenticators: + token: "#/definitions/api_authenticator" + oauth: "#/definitions/oauth_authenticator" retriever: type: SimpleRetriever