예제 #1
0
 public UserAccessApiClient(HttpClient httpClient, IOptions <UrlsConfig> urlConfig,
                            IOptions <IdentityConfig> identityConfig, IExecutionContextAccessor executionContextAccessor)
 {
     _httpClient = httpClient;
     _urls       = urlConfig.Value;
     _identity   = identityConfig.Value;
     _httpClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", executionContextAccessor.GetTokenAsync().Result);
 }