airbyte-cdk 0.36.5__tar.gz → 0.37.0__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/PKG-INFO +1 -1
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/auth/oauth.py +13 -6
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/declarative_component_schema.yaml +0 -1
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/models/declarative_component_schema.py +2 -2
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/streams/http/requests_native_auth/abstract_oauth.py +2 -2
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk.egg-info/PKG-INFO +1 -1
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/setup.py +1 -1
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/unit_tests/sources/declarative/auth/test_oauth.py +77 -2
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/LICENSE.txt +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/README.md +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/__init__.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/config_observation.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/connector.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/connector_builder/__init__.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/connector_builder/connector_builder_handler.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/connector_builder/main.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/connector_builder/message_grouper.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/connector_builder/models.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/destinations/__init__.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/destinations/destination.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/entrypoint.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/exception_handler.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/logger.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/models/__init__.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/models/airbyte_protocol.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/models/well_known_types.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/py.typed +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/__init__.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/abstract_source.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/config.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/connector_state_manager.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/__init__.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/auth/__init__.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/auth/declarative_authenticator.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/auth/token.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/checks/__init__.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/checks/check_stream.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/checks/connection_checker.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/create_partial.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/datetime/__init__.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/datetime/datetime_parser.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/datetime/min_max_datetime.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/declarative_source.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/declarative_stream.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/decoders/__init__.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/decoders/decoder.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/decoders/json_decoder.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/exceptions.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/extractors/__init__.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/extractors/dpath_extractor.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/extractors/http_selector.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/extractors/record_extractor.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/extractors/record_filter.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/extractors/record_selector.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/incremental/__init__.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/incremental/datetime_based_cursor.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/interpolation/__init__.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/interpolation/filters.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/interpolation/interpolated_boolean.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/interpolation/interpolated_mapping.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/interpolation/interpolated_string.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/interpolation/interpolation.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/interpolation/jinja.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/interpolation/macros.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/manifest_declarative_source.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/models/__init__.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/parsers/__init__.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/parsers/class_types_registry.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/parsers/custom_exceptions.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/parsers/default_implementation_registry.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/parsers/manifest_component_transformer.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/parsers/manifest_reference_resolver.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/parsers/model_to_component_factory.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/partition_routers/__init__.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/partition_routers/list_partition_router.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/partition_routers/single_partition_router.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/partition_routers/substream_partition_router.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/requesters/__init__.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/requesters/error_handlers/__init__.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/requesters/error_handlers/backoff_strategies/__init__.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/requesters/error_handlers/backoff_strategies/constant_backoff_strategy.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/requesters/error_handlers/backoff_strategies/exponential_backoff_strategy.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/requesters/error_handlers/backoff_strategies/header_helper.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/requesters/error_handlers/backoff_strategies/wait_time_from_header_backoff_strategy.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/requesters/error_handlers/backoff_strategies/wait_until_time_from_header_backoff_strategy.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/requesters/error_handlers/backoff_strategy.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/requesters/error_handlers/composite_error_handler.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/requesters/error_handlers/default_error_handler.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/requesters/error_handlers/error_handler.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/requesters/error_handlers/http_response_filter.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/requesters/error_handlers/response_action.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/requesters/error_handlers/response_status.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/requesters/http_requester.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/requesters/paginators/__init__.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/requesters/paginators/default_paginator.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/requesters/paginators/no_pagination.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/requesters/paginators/paginator.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/requesters/paginators/strategies/__init__.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/requesters/paginators/strategies/cursor_pagination_strategy.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/requesters/paginators/strategies/offset_increment.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/requesters/paginators/strategies/page_increment.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/requesters/paginators/strategies/pagination_strategy.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/requesters/request_option.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/requesters/request_options/__init__.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/requesters/request_options/interpolated_request_input_provider.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/requesters/request_options/interpolated_request_options_provider.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/requesters/request_options/request_options_provider.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/requesters/request_path.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/requesters/requester.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/retrievers/__init__.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/retrievers/retriever.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/retrievers/simple_retriever.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/schema/__init__.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/schema/default_schema_loader.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/schema/inline_schema_loader.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/schema/json_file_schema_loader.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/schema/schema_loader.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/spec/__init__.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/spec/spec.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/stream_slicers/__init__.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/stream_slicers/cartesian_product_stream_slicer.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/stream_slicers/stream_slicer.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/transformations/__init__.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/transformations/add_fields.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/transformations/remove_fields.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/transformations/transformation.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/types.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/yaml_declarative_source.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/deprecated/__init__.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/deprecated/base_source.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/deprecated/client.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/singer/__init__.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/singer/singer_helpers.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/singer/source.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/source.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/streams/__init__.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/streams/availability_strategy.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/streams/core.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/streams/http/__init__.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/streams/http/auth/__init__.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/streams/http/auth/core.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/streams/http/auth/oauth.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/streams/http/auth/token.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/streams/http/availability_strategy.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/streams/http/exceptions.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/streams/http/http.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/streams/http/rate_limiting.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/streams/http/requests_native_auth/__init__.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/streams/http/requests_native_auth/abstract_token.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/streams/http/requests_native_auth/oauth.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/streams/http/requests_native_auth/token.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/streams/utils/__init__.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/streams/utils/stream_helper.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/utils/__init__.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/utils/casing.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/utils/catalog_helpers.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/utils/record_helper.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/utils/schema_helpers.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/utils/schema_models.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/utils/transform.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/utils/__init__.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/utils/airbyte_secrets_utils.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/utils/event_timing.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/utils/schema_inferrer.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/utils/stream_status_utils.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/utils/traced_exception.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk.egg-info/SOURCES.txt +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk.egg-info/dependency_links.txt +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk.egg-info/requires.txt +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk.egg-info/top_level.txt +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/pyproject.toml +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/setup.cfg +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/source_declarative_manifest/__init__.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/source_declarative_manifest/main.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/unit_tests/connector_builder/__init__.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/unit_tests/connector_builder/test_connector_builder_handler.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/unit_tests/connector_builder/test_message_grouper.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/unit_tests/connector_builder/utils.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/unit_tests/destinations/__init__.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/unit_tests/destinations/test_destination.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/unit_tests/singer/__init__.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/unit_tests/singer/test_singer_helpers.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/unit_tests/singer/test_singer_source.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/unit_tests/sources/__init__.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/unit_tests/sources/declarative/__init__.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/unit_tests/sources/declarative/auth/__init__.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/unit_tests/sources/declarative/auth/test_session_token_auth.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/unit_tests/sources/declarative/auth/test_token_auth.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/unit_tests/sources/declarative/checks/__init__.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/unit_tests/sources/declarative/checks/test_check_stream.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/unit_tests/sources/declarative/decoders/__init__.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/unit_tests/sources/declarative/decoders/test_json_decoder.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/unit_tests/sources/declarative/external_component.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/unit_tests/sources/declarative/extractors/__init__.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/unit_tests/sources/declarative/extractors/test_dpath_extractor.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/unit_tests/sources/declarative/extractors/test_record_filter.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/unit_tests/sources/declarative/extractors/test_record_selector.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/unit_tests/sources/declarative/incremental/__init__.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/unit_tests/sources/declarative/incremental/test_datetime_based_cursor.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/unit_tests/sources/declarative/interpolation/__init__.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/unit_tests/sources/declarative/interpolation/test_filters.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/unit_tests/sources/declarative/interpolation/test_interpolated_boolean.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/unit_tests/sources/declarative/interpolation/test_interpolated_mapping.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/unit_tests/sources/declarative/interpolation/test_interpolated_string.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/unit_tests/sources/declarative/interpolation/test_jinja.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/unit_tests/sources/declarative/interpolation/test_macros.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/unit_tests/sources/declarative/parsers/__init__.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/unit_tests/sources/declarative/parsers/test_manifest_component_transformer.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/unit_tests/sources/declarative/parsers/test_manifest_reference_resolver.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/unit_tests/sources/declarative/parsers/test_model_to_component_factory.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/unit_tests/sources/declarative/parsers/testing_components.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/unit_tests/sources/declarative/partition_routers/__init__.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/unit_tests/sources/declarative/partition_routers/test_list_partition_router.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/unit_tests/sources/declarative/partition_routers/test_single_partition_router.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/unit_tests/sources/declarative/partition_routers/test_substream_partition_router.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/unit_tests/sources/declarative/requesters/__init__.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/unit_tests/sources/declarative/requesters/error_handlers/__init__.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/unit_tests/sources/declarative/requesters/error_handlers/backoff_strategies/__init__.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/unit_tests/sources/declarative/requesters/error_handlers/backoff_strategies/test_constant_backoff.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/unit_tests/sources/declarative/requesters/error_handlers/backoff_strategies/test_exponential_backoff.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/unit_tests/sources/declarative/requesters/error_handlers/backoff_strategies/test_header_helper.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/unit_tests/sources/declarative/requesters/error_handlers/backoff_strategies/test_wait_time_from_header.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/unit_tests/sources/declarative/requesters/error_handlers/backoff_strategies/test_wait_until_time_from_header.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/unit_tests/sources/declarative/requesters/error_handlers/test_composite_error_handler.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/unit_tests/sources/declarative/requesters/error_handlers/test_default_error_handler.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/unit_tests/sources/declarative/requesters/error_handlers/test_http_response_filter.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/unit_tests/sources/declarative/requesters/error_handlers/test_response_status.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/unit_tests/sources/declarative/requesters/paginators/__init__.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/unit_tests/sources/declarative/requesters/paginators/test_cursor_pagination_strategy.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/unit_tests/sources/declarative/requesters/paginators/test_default_paginator.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/unit_tests/sources/declarative/requesters/paginators/test_no_paginator.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/unit_tests/sources/declarative/requesters/paginators/test_offset_increment.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/unit_tests/sources/declarative/requesters/paginators/test_page_increment.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/unit_tests/sources/declarative/requesters/paginators/test_request_option.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/unit_tests/sources/declarative/requesters/request_options/__init__.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/unit_tests/sources/declarative/requesters/request_options/test_interpolated_request_options_provider.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/unit_tests/sources/declarative/requesters/test_http_requester.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/unit_tests/sources/declarative/requesters/test_interpolated_request_input_provider.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/unit_tests/sources/declarative/retrievers/__init__.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/unit_tests/sources/declarative/retrievers/test_simple_retriever.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/unit_tests/sources/declarative/schema/__init__.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/unit_tests/sources/declarative/schema/source_test/SourceTest.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/unit_tests/sources/declarative/schema/source_test/__init__.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/unit_tests/sources/declarative/schema/test_default_schema_loader.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/unit_tests/sources/declarative/schema/test_inline_schema_loader.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/unit_tests/sources/declarative/schema/test_json_file_schema_loader.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/unit_tests/sources/declarative/states/__init__.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/unit_tests/sources/declarative/stream_slicers/__init__.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/unit_tests/sources/declarative/stream_slicers/test_cartesian_product_stream_slicer.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/unit_tests/sources/declarative/test_create_partial.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/unit_tests/sources/declarative/test_declarative_stream.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/unit_tests/sources/declarative/test_manifest_declarative_source.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/unit_tests/sources/declarative/test_yaml_declarative_source.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/unit_tests/sources/streams/__init__.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/unit_tests/sources/streams/http/__init__.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/unit_tests/sources/streams/http/auth/__init__.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/unit_tests/sources/streams/http/auth/test_auth.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/unit_tests/sources/streams/http/requests_native_auth/__init__.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/unit_tests/sources/streams/http/requests_native_auth/test_requests_native_auth.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/unit_tests/sources/streams/http/test_availability_strategy.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/unit_tests/sources/streams/http/test_http.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/unit_tests/sources/streams/test_availability_strategy.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/unit_tests/sources/streams/test_streams_core.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/unit_tests/sources/test_abstract_source.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/unit_tests/sources/test_config.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/unit_tests/sources/test_connector_state_manager.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/unit_tests/sources/test_source.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/unit_tests/utils/__init__.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/unit_tests/utils/test_schema_inferrer.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/unit_tests/utils/test_secret_utils.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/unit_tests/utils/test_stream_status_utils.py +0 -0
- {airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/unit_tests/utils/test_traced_exception.py +0 -0
@@ -31,15 +31,15 @@ class DeclarativeOauth2Authenticator(AbstractOauth2Authenticator, DeclarativeAut
|
|
31
31
|
token_expiry_date (Optional[Union[InterpolatedString, str]]): The access token expiration date
|
32
32
|
token_expiry_date_format str: format of the datetime; provide it if expires_in is returned in datetime instead of seconds
|
33
33
|
refresh_request_body (Optional[Mapping[str, Any]]): The request body to send in the refresh request
|
34
|
-
grant_type: The grant_type to request for access_token
|
34
|
+
grant_type: The grant_type to request for access_token. If set to refresh_token, the refresh_token parameter has to be provided
|
35
35
|
"""
|
36
36
|
|
37
37
|
token_refresh_endpoint: Union[InterpolatedString, str]
|
38
38
|
client_id: Union[InterpolatedString, str]
|
39
39
|
client_secret: Union[InterpolatedString, str]
|
40
|
-
refresh_token: Union[InterpolatedString, str]
|
41
40
|
config: Mapping[str, Any]
|
42
41
|
parameters: InitVar[Mapping[str, Any]]
|
42
|
+
refresh_token: Optional[Union[InterpolatedString, str]] = None
|
43
43
|
scopes: Optional[List[str]] = None
|
44
44
|
token_expiry_date: Optional[Union[InterpolatedString, str]] = None
|
45
45
|
_token_expiry_date: pendulum.DateTime = field(init=False, repr=False, default=None)
|
@@ -53,7 +53,8 @@ class DeclarativeOauth2Authenticator(AbstractOauth2Authenticator, DeclarativeAut
|
|
53
53
|
self.token_refresh_endpoint = InterpolatedString.create(self.token_refresh_endpoint, parameters=parameters)
|
54
54
|
self.client_id = InterpolatedString.create(self.client_id, parameters=parameters)
|
55
55
|
self.client_secret = InterpolatedString.create(self.client_secret, parameters=parameters)
|
56
|
-
self.refresh_token
|
56
|
+
if self.refresh_token is not None:
|
57
|
+
self.refresh_token = InterpolatedString.create(self.refresh_token, parameters=parameters)
|
57
58
|
self.access_token_name = InterpolatedString.create(self.access_token_name, parameters=parameters)
|
58
59
|
self.expires_in_name = InterpolatedString.create(self.expires_in_name, parameters=parameters)
|
59
60
|
self.grant_type = InterpolatedString.create(self.grant_type, parameters=parameters)
|
@@ -65,6 +66,9 @@ class DeclarativeOauth2Authenticator(AbstractOauth2Authenticator, DeclarativeAut
|
|
65
66
|
)
|
66
67
|
self._access_token = None
|
67
68
|
|
69
|
+
if self.get_grant_type() == "refresh_token" and self.refresh_token is None:
|
70
|
+
raise ValueError("OAuthAuthenticator needs a refresh_token parameter if grant_type is set to `refresh_token`")
|
71
|
+
|
68
72
|
def get_token_refresh_endpoint(self) -> str:
|
69
73
|
return self.token_refresh_endpoint.eval(self.config)
|
70
74
|
|
@@ -74,8 +78,8 @@ class DeclarativeOauth2Authenticator(AbstractOauth2Authenticator, DeclarativeAut
|
|
74
78
|
def get_client_secret(self) -> str:
|
75
79
|
return self.client_secret.eval(self.config)
|
76
80
|
|
77
|
-
def get_refresh_token(self) -> str:
|
78
|
-
return self.refresh_token.eval(self.config)
|
81
|
+
def get_refresh_token(self) -> Optional[str]:
|
82
|
+
return None if self.refresh_token is None else self.refresh_token.eval(self.config)
|
79
83
|
|
80
84
|
def get_scopes(self) -> [str]:
|
81
85
|
return self.scopes
|
@@ -117,7 +121,10 @@ class DeclarativeOauth2Authenticator(AbstractOauth2Authenticator, DeclarativeAut
|
|
117
121
|
if self.token_expiry_date_format:
|
118
122
|
self._token_expiry_date = pendulum.from_format(value, self.token_expiry_date_format)
|
119
123
|
else:
|
120
|
-
|
124
|
+
try:
|
125
|
+
self._token_expiry_date = pendulum.now().add(seconds=int(float(value)))
|
126
|
+
except ValueError:
|
127
|
+
raise ValueError(f"Invalid token expiry value {value}; a number is required.")
|
121
128
|
|
122
129
|
@property
|
123
130
|
def access_token(self) -> str:
|
@@ -277,8 +277,8 @@ class OAuthAuthenticator(BaseModel):
|
|
277
277
|
],
|
278
278
|
title="Client Secret",
|
279
279
|
)
|
280
|
-
refresh_token: str = Field(
|
281
|
-
|
280
|
+
refresh_token: Optional[str] = Field(
|
281
|
+
None,
|
282
282
|
description="Credential artifact used to get a new access token.",
|
283
283
|
examples=[
|
284
284
|
"{{ config['refresh_token'] }}",
|
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
import logging
|
6
6
|
from abc import abstractmethod
|
7
|
-
from typing import Any, List, Mapping, MutableMapping, Tuple, Union
|
7
|
+
from typing import Any, List, Mapping, MutableMapping, Optional, Tuple, Union
|
8
8
|
|
9
9
|
import backoff
|
10
10
|
import pendulum
|
@@ -111,7 +111,7 @@ class AbstractOauth2Authenticator(AuthBase):
|
|
111
111
|
"""The client secret to authenticate"""
|
112
112
|
|
113
113
|
@abstractmethod
|
114
|
-
def get_refresh_token(self) -> str:
|
114
|
+
def get_refresh_token(self) -> Optional[str]:
|
115
115
|
"""The token used to refresh the access token when it expires"""
|
116
116
|
|
117
117
|
@abstractmethod
|
@@ -17,7 +17,7 @@ setup(
|
|
17
17
|
name="airbyte-cdk",
|
18
18
|
# The version of the airbyte-cdk package is used at runtime to validate manifests. That validation must be
|
19
19
|
# updated if our semver format changes such as using release candidate versions.
|
20
|
-
version="0.
|
20
|
+
version="0.37.0",
|
21
21
|
description="A framework for writing Airbyte Connectors.",
|
22
22
|
long_description=README,
|
23
23
|
long_description_content_type="text/markdown",
|
@@ -65,6 +65,42 @@ class TestOauth2Authenticator:
|
|
65
65
|
}
|
66
66
|
assert body == expected
|
67
67
|
|
68
|
+
def test_refresh_without_refresh_token(self):
|
69
|
+
"""
|
70
|
+
Should work fine for grant_type client_credentials.
|
71
|
+
"""
|
72
|
+
oauth = DeclarativeOauth2Authenticator(
|
73
|
+
token_refresh_endpoint="{{ config['refresh_endpoint'] }}",
|
74
|
+
client_id="{{ config['client_id'] }}",
|
75
|
+
client_secret="{{ config['client_secret'] }}",
|
76
|
+
config=config,
|
77
|
+
parameters={},
|
78
|
+
grant_type="client_credentials",
|
79
|
+
)
|
80
|
+
body = oauth.build_refresh_request_body()
|
81
|
+
expected = {
|
82
|
+
"grant_type": "client_credentials",
|
83
|
+
"client_id": "some_client_id",
|
84
|
+
"client_secret": "some_client_secret",
|
85
|
+
"refresh_token": None,
|
86
|
+
"scopes": None,
|
87
|
+
}
|
88
|
+
assert body == expected
|
89
|
+
|
90
|
+
def test_error_on_refresh_token_grant_without_refresh_token(self):
|
91
|
+
"""
|
92
|
+
Should throw an error if grant_type refresh_token is configured without refresh_token.
|
93
|
+
"""
|
94
|
+
with pytest.raises(ValueError):
|
95
|
+
DeclarativeOauth2Authenticator(
|
96
|
+
token_refresh_endpoint="{{ config['refresh_endpoint'] }}",
|
97
|
+
client_id="{{ config['client_id'] }}",
|
98
|
+
client_secret="{{ config['client_secret'] }}",
|
99
|
+
config=config,
|
100
|
+
parameters={},
|
101
|
+
grant_type="refresh_token",
|
102
|
+
)
|
103
|
+
|
68
104
|
def test_refresh_access_token(self, mocker):
|
69
105
|
oauth = DeclarativeOauth2Authenticator(
|
70
106
|
token_refresh_endpoint="{{ config['refresh_endpoint'] }}",
|
@@ -92,12 +128,11 @@ class TestOauth2Authenticator:
|
|
92
128
|
@pytest.mark.parametrize(
|
93
129
|
"expires_in_response, token_expiry_date_format",
|
94
130
|
[
|
95
|
-
(86400, None),
|
96
131
|
("2020-01-02T00:00:00Z", "YYYY-MM-DDTHH:mm:ss[Z]"),
|
97
132
|
("2020-01-02T00:00:00.000000+00:00", "YYYY-MM-DDTHH:mm:ss.SSSSSSZ"),
|
98
133
|
("2020-01-02", "YYYY-MM-DD"),
|
99
134
|
],
|
100
|
-
ids=["
|
135
|
+
ids=["rfc3339", "iso8601", "simple_date"],
|
101
136
|
)
|
102
137
|
@freezegun.freeze_time("2020-01-01")
|
103
138
|
def test_refresh_access_token_expire_format(self, mocker, expires_in_response, token_expiry_date_format):
|
@@ -127,6 +162,46 @@ class TestOauth2Authenticator:
|
|
127
162
|
assert "access_token" == token
|
128
163
|
assert oauth.get_token_expiry_date() == pendulum.parse(next_day)
|
129
164
|
|
165
|
+
@pytest.mark.parametrize(
|
166
|
+
"expires_in_response, next_day, raises",
|
167
|
+
[
|
168
|
+
(86400, "2020-01-02T00:00:00Z", False),
|
169
|
+
(86400.1, "2020-01-02T00:00:00Z", False),
|
170
|
+
("86400", "2020-01-02T00:00:00Z", False),
|
171
|
+
("86400.1", "2020-01-02T00:00:00Z", False),
|
172
|
+
("2020-01-02T00:00:00Z", "2020-01-02T00:00:00Z", True),
|
173
|
+
],
|
174
|
+
ids=["time_in_seconds", "time_in_seconds_float", "time_in_seconds_str", "time_in_seconds_str_float", "invalid"],
|
175
|
+
)
|
176
|
+
@freezegun.freeze_time("2020-01-01")
|
177
|
+
def test_set_token_expiry_date_no_format(self, mocker, expires_in_response, next_day, raises):
|
178
|
+
config.update({"token_expiry_date": pendulum.parse(next_day).subtract(days=2).to_rfc3339_string()})
|
179
|
+
oauth = DeclarativeOauth2Authenticator(
|
180
|
+
token_refresh_endpoint="{{ config['refresh_endpoint'] }}",
|
181
|
+
client_id="{{ config['client_id'] }}",
|
182
|
+
client_secret="{{ config['client_secret'] }}",
|
183
|
+
refresh_token="{{ config['refresh_token'] }}",
|
184
|
+
config=config,
|
185
|
+
scopes=["scope1", "scope2"],
|
186
|
+
refresh_request_body={
|
187
|
+
"custom_field": "{{ config['custom_field'] }}",
|
188
|
+
"another_field": "{{ config['another_field'] }}",
|
189
|
+
"scopes": ["no_override"],
|
190
|
+
},
|
191
|
+
parameters={},
|
192
|
+
)
|
193
|
+
|
194
|
+
resp.status_code = 200
|
195
|
+
mocker.patch.object(resp, "json", return_value={"access_token": "access_token", "expires_in": expires_in_response})
|
196
|
+
mocker.patch.object(requests, "request", side_effect=mock_request, autospec=True)
|
197
|
+
if raises:
|
198
|
+
with pytest.raises(ValueError):
|
199
|
+
oauth.get_access_token()
|
200
|
+
else:
|
201
|
+
token = oauth.get_access_token()
|
202
|
+
assert "access_token" == token
|
203
|
+
assert oauth.get_token_expiry_date() == pendulum.parse(next_day)
|
204
|
+
|
130
205
|
|
131
206
|
def mock_request(method, url, data):
|
132
207
|
if url == "refresh_end":
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/connector_builder/connector_builder_handler.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/checks/__init__.py
RENAMED
File without changes
|
{airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/checks/check_stream.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
{airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/datetime/__init__.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
{airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/declarative_source.py
RENAMED
File without changes
|
{airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/declarative_stream.py
RENAMED
File without changes
|
{airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/decoders/__init__.py
RENAMED
File without changes
|
{airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/decoders/decoder.py
RENAMED
File without changes
|
{airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/decoders/json_decoder.py
RENAMED
File without changes
|
File without changes
|
{airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/extractors/__init__.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/incremental/__init__.py
RENAMED
File without changes
|
File without changes
|
{airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/interpolation/__init__.py
RENAMED
File without changes
|
{airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/interpolation/filters.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/interpolation/jinja.py
RENAMED
File without changes
|
{airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/interpolation/macros.py
RENAMED
File without changes
|
File without changes
|
{airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/models/__init__.py
RENAMED
File without changes
|
{airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/parsers/__init__.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/requesters/__init__.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/requesters/request_path.py
RENAMED
File without changes
|
{airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/requesters/requester.py
RENAMED
File without changes
|
{airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/retrievers/__init__.py
RENAMED
File without changes
|
{airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/retrievers/retriever.py
RENAMED
File without changes
|
File without changes
|
{airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/schema/__init__.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/schema/schema_loader.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
{airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/stream_slicers/__init__.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/declarative/yaml_declarative_source.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/streams/availability_strategy.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{airbyte-cdk-0.36.5 → airbyte-cdk-0.37.0}/airbyte_cdk/sources/streams/http/availability_strategy.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|