OAuthRefreshInterceptor
constructor(clientInfo: RestClient.ClientInfo, authToken: String, authTokenProvider: RestClient.AuthTokenProvider)
Constructs a SalesforceHttpInterceptor with the given clientInfo, authToken and authTokenProvider. When it gets a 401 (not authorized) response from the server:
- If authTokenProvider is not null, it will ask the authTokenProvider for a new access token and retry the request a second time.
- Otherwise it will return the 401 response.
Parameters
clientInfo
authToken
authTokenProvider
constructor(clientInfo: RestClient.ClientInfo, authToken: String, tokenType: String, authTokenProvider: RestClient.AuthTokenProvider)
Overload that accepts a token type, used to select between the Bearer and DPoP Authorization header schemes.
Parameters
clientInfo
authToken
tokenType
authTokenProvider
constructor(clientInfo: RestClient.ClientInfo, authToken: String, tokenType: String, credentialsIdentifier: String, authTokenProvider: RestClient.AuthTokenProvider)
Overload that accepts a token type and credentials identifier for DPoP key lookup.
Parameters
clientInfo
authToken
tokenType
credentialsIdentifier
authTokenProvider