airbyte-cdk 6.12.3__py3-none-any.whl → 6.12.4__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -54,17 +54,13 @@ class AbstractOauth2Authenticator(AuthBase):
54
54
 
55
55
  def get_auth_header(self) -> Mapping[str, Any]:
56
56
  """HTTP header to set on the requests"""
57
- token = (
58
- self.access_token
59
- if (
60
- not self.get_token_refresh_endpoint()
61
- or not self.get_refresh_token()
62
- and self.access_token
63
- )
64
- else self.get_access_token()
65
- )
57
+ token = self.access_token if self._is_access_token_flow else self.get_access_token()
66
58
  return {"Authorization": f"Bearer {token}"}
67
59
 
60
+ @property
61
+ def _is_access_token_flow(self) -> bool:
62
+ return self.get_token_refresh_endpoint() is None and self.access_token is not None
63
+
68
64
  def get_access_token(self) -> str:
69
65
  """Returns the access token"""
70
66
  if self.token_has_expired():
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: airbyte-cdk
3
- Version: 6.12.3
3
+ Version: 6.12.4
4
4
  Summary: A framework for writing Airbyte Connectors.
5
5
  Home-page: https://airbyte.com
6
6
  License: MIT
@@ -284,7 +284,7 @@ airbyte_cdk/sources/streams/http/http.py,sha256=JAMpiTdS9HFNOlwayWNvQdxoqs2rpW9w
284
284
  airbyte_cdk/sources/streams/http/http_client.py,sha256=tDE0ROtxjGMVphvsw8INvGMtZ97hIF-v47pZ3jIyiwc,23011
285
285
  airbyte_cdk/sources/streams/http/rate_limiting.py,sha256=IwdjrHKUnU97XO4qONgYRv4YYW51xQ8SJm4WLafXDB8,6351
286
286
  airbyte_cdk/sources/streams/http/requests_native_auth/__init__.py,sha256=RN0D3nOX1xLgwEwKWu6pkGy3XqBFzKSNZ8Lf6umU2eY,413
287
- airbyte_cdk/sources/streams/http/requests_native_auth/abstract_oauth.py,sha256=fnxafAc8qBFWVN_r7ViOWqDObfe3S_DWhnlNfabMWSI,10661
287
+ airbyte_cdk/sources/streams/http/requests_native_auth/abstract_oauth.py,sha256=sxmrQKAvN8piamssL3xh8KXevTwdaXuLs2O0hNEA5aQ,10635
288
288
  airbyte_cdk/sources/streams/http/requests_native_auth/abstract_token.py,sha256=Y3n7J-sk5yGjv_OxtY6Z6k0PEsFZmtIRi-x0KCbaHdA,1010
289
289
  airbyte_cdk/sources/streams/http/requests_native_auth/oauth.py,sha256=ka-bBRWvIv09LmZNYl49p2lK9nd_Tvi2g0lIp3OkU40,14872
290
290
  airbyte_cdk/sources/streams/http/requests_native_auth/token.py,sha256=h5PTzcdH-RQLeCg7xZ45w_484OPUDSwNWl_iMJQmZoI,2526
@@ -339,8 +339,8 @@ airbyte_cdk/utils/slice_hasher.py,sha256=-pHexlNYoWYPnXNH-M7HEbjmeJe9Zk7SJijdQ7d
339
339
  airbyte_cdk/utils/spec_schema_transformations.py,sha256=-5HTuNsnDBAhj-oLeQXwpTGA0HdcjFOf2zTEMUTTg_Y,816
340
340
  airbyte_cdk/utils/stream_status_utils.py,sha256=ZmBoiy5HVbUEHAMrUONxZvxnvfV9CesmQJLDTAIWnWw,1171
341
341
  airbyte_cdk/utils/traced_exception.py,sha256=C8uIBuCL_E4WnBAOPSxBicD06JAldoN9fGsQDp463OY,6292
342
- airbyte_cdk-6.12.3.dist-info/LICENSE.txt,sha256=Wfe61S4BaGPj404v8lrAbvhjYR68SHlkzeYrg3_bbuM,1051
343
- airbyte_cdk-6.12.3.dist-info/METADATA,sha256=DdnFFX5s5OryiCi_NdkLKY0kaS73iI-GmSTbJuX-nVI,5988
344
- airbyte_cdk-6.12.3.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
345
- airbyte_cdk-6.12.3.dist-info/entry_points.txt,sha256=fj-e3PAQvsxsQzyyq8UkG1k8spunWnD4BAH2AwlR6NM,95
346
- airbyte_cdk-6.12.3.dist-info/RECORD,,
342
+ airbyte_cdk-6.12.4.dist-info/LICENSE.txt,sha256=Wfe61S4BaGPj404v8lrAbvhjYR68SHlkzeYrg3_bbuM,1051
343
+ airbyte_cdk-6.12.4.dist-info/METADATA,sha256=D834aeGVbK09HrQAPdzr5CQpYGyIbDiimRO10ltuF2Q,5988
344
+ airbyte_cdk-6.12.4.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
345
+ airbyte_cdk-6.12.4.dist-info/entry_points.txt,sha256=fj-e3PAQvsxsQzyyq8UkG1k8spunWnD4BAH2AwlR6NM,95
346
+ airbyte_cdk-6.12.4.dist-info/RECORD,,