This change gives the tap the ability to refresh its own access token, which is desirable for two reasons:
other taps, like tap-salesforce, refresh the access token internally, so this change makes tap-harvest more consistent with other Singer taps in its auth behavior
expired access tokens can be refreshed during a single sync run
Example run with good credentials:
$ tap-harvest -c harvest-config.json
INFO Refreshing access token
INFO Got refreshed access token
INFO Starting sync
...
with bad credentials:
$ tap-harvest -c harvest-config.json
INFO Refreshing access token
CRITICAL invalid_client
CRITICAL The client identifier provided is invalid, the client failed to authenticate, the client did not include its credentials, provided multiple client credentials, or used unsupported credentials type.
CRITICAL 'access_token'
...
This change gives the tap the ability to refresh its own access token, which is desirable for two reasons:
tap-salesforce
, refresh the access token internally, so this change makes tap-harvest more consistent with other Singer taps in its auth behaviorExample run with good credentials:
with bad credentials: