public abstract class ServiceAPI extends API
| Modifier and Type | Field and Description |
|---|---|
protected String |
accessToken |
protected boolean |
cacheAccessToken |
client, clientId, clientSecret, enableLogging, enableTelemetry, KEY_CLIENT_ID, KEY_CLIENT_SECRET| Constructor and Description |
|---|
ServiceAPI(String clientId,
String clientSecret,
String accessToken,
boolean enableLogging,
List<String> redactHeaders,
HttpOptions options,
Boolean enableTelemetry,
String sdkVersion,
String apiVersion) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
isAccessTokenCached() |
abstract void |
refreshAccessToken(Request<?> request)
Retrieve a new API access token to use on new calls.
|
protected void |
setAccessToken(String accessToken)
Update the API access token to use on new calls.
|
protected void |
validateCredentials() |
createUrlFromString, isLoggingEnabledprotected String accessToken
protected boolean cacheAccessToken
public abstract void refreshAccessToken(Request<?> request) throws ReloadlyException
request - - The request to refresh the token forReloadlyException - - Error captured when executing a http request to the Reloadly Serverpublic boolean isAccessTokenCached()
protected void validateCredentials()
protected void setAccessToken(String accessToken)
accessToken - the token to authenticate the calls with.Copyright © 2022. All rights reserved.