AccessTokenInterceptor
Interceptor used to add Bearer Token authentication headers to requests.
This interceptor adds the access token to the request headers for endpoints that require Bearer Token Authentication.
OAuth2 (consent) resource endpoints — those whose path contains the Constants.EndpointPaths.OAUTH2 segment but not the Constants.EndpointPaths.TOKEN segment, e.g. /{productType}/oauth2/{apiVersion}/userinfo — are authenticated with the OAuth2 consent token from CredentialProvider.getOauthAccessToken. All other endpoints, including the OAuth2 token endpoint (/{productType}/oauth2/token/) which mints that consent token, use the regular API-user Bearer token from CredentialProvider.getAccessToken.
The token is fetched from CredentialProvider on every request so that the SDK never holds credential state internally.
Parameters
Supplies the access token at request time.