public static class RestClient.OAuthRefreshInterceptor
extends java.lang.Object
Constructor and Description |
---|
OAuthRefreshInterceptor(RestClient.ClientInfo clientInfo,
java.lang.String authToken,
RestClient.AuthTokenProvider authTokenProvider)
Constructs a SalesforceHttpInterceptor with the given clientInfo, authToken and authTokenProvider.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getAuthToken() |
long |
getElapsedTimeSinceLastRefresh() |
java.lang.String |
getRefreshToken() |
Response |
intercept(Chain chain) |
void |
refreshAccessToken()
Swaps the existing access token for a new one.
|
void |
setClientInfo(RestClient.ClientInfo clientInfo) |
public OAuthRefreshInterceptor(RestClient.ClientInfo clientInfo, java.lang.String authToken, RestClient.AuthTokenProvider authTokenProvider)
clientInfo
- authToken
- authTokenProvider
- public Response intercept(Chain chain) throws java.io.IOException
java.io.IOException
public java.lang.String getAuthToken()
public java.lang.String getRefreshToken()
public long getElapsedTimeSinceLastRefresh()
public void refreshAccessToken() throws java.io.IOException
java.io.IOException
public void setClientInfo(RestClient.ClientInfo clientInfo)