Ver Fonte

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

lcl há 4 meses atrás
pai
commit
50df479c38
1 ficheiros alterados com 1 adições e 0 exclusões
  1. 1 0
      AppStart/Helper/PublicImportDataService.cs

+ 1 - 0
AppStart/Helper/PublicImportDataService.cs

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