How to replace the authenticator by a custom authe...
# ask-ai
m
How to replace the authenticator by a custom authenticator using the low code implementation for a new connector?
k
To replace the authenticator with a custom authenticator using the low-code implementation for a new connector in Airbyte, you can follow these steps: 1. Identify the Custom Authentication Requirements: Determine the type of custom authentication your API requires. This could involve signing requests, multiple requests to authenticate, or other complex schemes. 2. Use the Low-Code CDK: For complex custom authentication schemes, you will need to use the low-code CDK. The low-code CDK allows you to define custom authenticators in a configuration file. 3. Define the Custom Authenticator: You can define a custom authenticator in your connector's configuration file. Here is an example of how to use a
SessionTokenAuthenticator
for a custom OAuth implementation:
Copy code
yaml    authenticator:      type: SessionTokenAuthenticator      login_requester:        type: HttpRequester        url_base: <https://www.wixapis.com/oauth>        path: access        authenticator:          type: NoAuth        http_method: POST        request_parameters: {}        request_headers: {}        request_body_json:          grant_type: refresh_token          client_id: '{{ config.client_id }}'          client_secret: '{{ config.client_secret }}'          refresh_token: '{{ config.refresh_token }}'      session_token_path:        - access_token      expiration_duration: PT4M      request_authentication:        type: ApiKey        inject_into:          type: RequestOption          inject_into: header          field_name: Authorization
This example shows how to configure a
SessionTokenAuthenticator
that handles OAuth by making a POST request to obtain an access token and then using that token for subsequent requests. 4. Test the Configuration: After defining your custom authenticator, test the configuration using the
spec
,
read
, and
check
commands to ensure it works correctly. 5. Deploy the Connector: Once you have verified that the custom authenticator works as expected, you can build and deploy your connector. For more detailed information, you can refer to the [Airbyte documentation on custom authentication methods](https://docs.airbyte.com/connector-development/connector-builder-ui/authentication#custom-authentication-methods). If you encounter any issues or need further assistance, you can also check the [Airbyte forum](https://discuss.airbyte.io/t/252) for community support and additional examples. By following these steps, you should be able to replace the authenticator with a custom authenticator using the low-code implementation for your new connector.