OAuthRefreshInterceptor

open class OAuthRefreshInterceptor : Interceptor

Network interceptor that does oauth refresh and request retry when access token has expired.

Constructors

Link copied to clipboard
constructor(clientInfo: RestClient.ClientInfo, authToken: String, authTokenProvider: RestClient.AuthTokenProvider)
Constructs a SalesforceHttpInterceptor with the given clientInfo, authToken and 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.
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.

Properties

Link copied to clipboard
open val authToken: String
Link copied to clipboard
val Companion: Interceptor.Companion

Functions

Link copied to clipboard
Link copied to clipboard
open fun intercept(chain: Interceptor.Chain): Response
Link copied to clipboard
Swaps the existing access token for a new one.
Link copied to clipboard
open fun setClientInfo(clientInfo: RestClient.ClientInfo)