Christian Schawe
08/01/2023, 8:09 AMs = airbyte.Airbyte(
security=shared.Security(
bearer_auth="",
),
)
without any explanation about whats happening there. Is there a way to change that to basic auth or something so i can test locally if that script would work in production? Or where can I find documentation about how to properly use that?user
08/01/2023, 8:10 AMTokenAuthenticator
and Oauth2Authenticator
classes respectively. Both authentication strategies place the API token in the Authorization
header. The OAuth2Authenticator
goes a step further and has mechanisms to refresh the current access token given a refresh token. However, it currently only supports refresh tokens and not the full OAuth2.0 loop. You can use either authenticator by passing the created authenticator into the relevant HTTPStream
constructor. Here is an [example](https://github.com/airbytehq/airbyte/blob/master/airbyte-integrations/connectors/source-stripe/source_stripe/source.py#L242) from the Stripe API [source](https://docs.airbyte.com/connector-development/cdk-python/http-streams). For complex custom authentication schemes involving signing requests or doing multiple requests to authenticate, you can use the [low-code CDK](https://docs.airbyte.com/connector-development/config-based/low-code-cdk-overview) or [Python CDK](https://docs.airbyte.com/connector-development/cdk-python/) [source](https://docs.airbyte.com/connector-development/connector-builder-ui/authentication). However, the specific package "airbyte-api-python-sdk" and its usage are not mentioned in the provided extracts. For more detailed information on how to use this package, I would recommend checking the official documentation or reaching out to the Airbyte community on [Slack](https://slack.airbyte.io) or their [forum](https://discuss.airbyte.io).Christian Schawe
08/01/2023, 9:10 AMs = airbyte.Airbyte(
security= Oauth2Authenticator(
client_id=user,
client_secret=passwd,
token_refresh_endpoint=oauth_token_api,
refresh_token=None
),
server_url="<http://localhost:8000/api/v1/workspaces/list>"
_`#url_params=parameter`_
)
I get the error message "AttributeError: 'Oauth2Authenticator' object has no attribute '__dataclass_fields__'" and "TypeError: must be called with a dataclass type or instance"user
08/01/2023, 9:10 AM