fix 配置文件key

This commit is contained in:
2024-03-09 15:09:11 +08:00
parent d9e9856eab
commit ee451d25c7

View File

@@ -24,10 +24,10 @@ public class JinkoJIPService : IJinkoJIPService
private HttpClient GetHttpClient()
{
var httpClient = _httpClientFactory.CreateClient();
httpClient.BaseAddress = new Uri(_configuration.GetSection("Jinko:Jip:BaseUrl").Value);
httpClient.BaseAddress = new Uri(_configuration.GetSection("JinkoOptions:Jip:BaseUrl").Value);
//httpClient.Timeout = TimeSpan.FromMinutes(10);
var key = _configuration.GetSection("Jinko:Jip:Key").Value;
var secret = _configuration.GetSection("Jinko:Jip:Secret").Value;
var key = _configuration.GetSection("JinkoOptions:Jip:Key").Value;
var secret = _configuration.GetSection("JinkoOptions:Jip:Secret").Value;
httpClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", IssueJwt(key, secret, 5));
return httpClient;