According to Taboola's Authentication docs, Client Credentials authentication is equivalent to Password authentication, token-wise. Since the tap isn't using the refresh token retrieved using password auth.
This PR adds flexibility by allowing a fallback to use the client_id and client_secret only to retrieve a token, if Password Auth returns a 400. It also relies on the account_id returned through the token_details endpoint and treats this as a warning, rather than a hard error.
The reasoning is that the true credentials to authenticate are the client_id and client_secret, and the other pieces of validation are extras, and applied poorly.
Note This tap could use a revisiting to be up to date with the most recent Singer patterns and practices (e.g., metadata, field selection, discovery, etc.).
According to Taboola's Authentication docs, Client Credentials authentication is equivalent to Password authentication, token-wise. Since the tap isn't using the refresh token retrieved using password auth.
This PR adds flexibility by allowing a fallback to use the client_id and client_secret only to retrieve a token, if Password Auth returns a 400. It also relies on the account_id returned through the
token_details
endpoint and treats this as a warning, rather than a hard error.The reasoning is that the true credentials to authenticate are the
client_id
andclient_secret
, and the other pieces of validation are extras, and applied poorly.Note This tap could use a revisiting to be up to date with the most recent Singer patterns and practices (e.g., metadata, field selection, discovery, etc.).