public SalesforceClient(HttpClient httpClient, SalesforceOAuthToken salesforceToken, ILogger <SalesforceClient> logger) { this.HttpClient = httpClient; this.SalesforceToken = salesforceToken; this.logger = logger; httpClient.BaseAddress = new Uri(salesforceToken.InstanceUrl); httpClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue(salesforceToken.TokenType, salesforceToken.AccessToken); }
public Task SaveTokenAsync(string name, SalesforceOAuthToken token) { return(this.safeStore.WriteAsync(this.options.SalesforceOAuthTokenStoreCategoryName, name, token)); }