예제 #1
0
 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);
 }
예제 #2
0
 public Task SaveTokenAsync(string name, SalesforceOAuthToken token)
 {
     return(this.safeStore.WriteAsync(this.options.SalesforceOAuthTokenStoreCategoryName, name, token));
 }