Explorar o código

拉卡拉获取token接口,header里增加client_id字段

lcl hai 4 meses
pai
achega
50df479c38
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      AppStart/Helper/PublicImportDataService.cs

+ 1 - 0
AppStart/Helper/PublicImportDataService.cs

@@ -1338,6 +1338,7 @@ namespace MySystem
             if(string.IsNullOrEmpty(access_token))
             {
                 Dictionary<string, string> headers = new Dictionary<string, string>();
+                headers.Add("client_id", lklClientId);
                 headers.Add("Authorization", "Basic " + Convert.ToBase64String(Encoding.UTF8.GetBytes(lklClientId + ":" + lklClientSecret)));
                 Utils.WriteLog("请求地址\n" + lklReqUrl + "/htkauth/oauth/token", "拉卡拉获取Token2");
                 string reqStr = "grant_type=password&username=" + userName + "&password=" + password;