From 0ecadf2d4500e018ef59c5d7c0eb3b23856580f0 Mon Sep 17 00:00:00 2001
From: chenhaozhe <cgz@hz-kingdee.com>
Date: 星期一, 27 四月 2026 15:11:11 +0800
Subject: [PATCH] 调整 token自动刷新接口,解决token 无法自动刷新的问题

---
 WebAPI/Service/SignatureVerifyAttribute.cs |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/WebAPI/Service/SignatureVerifyAttribute.cs b/WebAPI/Service/SignatureVerifyAttribute.cs
index 12e8ea2..a4625ce 100644
--- a/WebAPI/Service/SignatureVerifyAttribute.cs
+++ b/WebAPI/Service/SignatureVerifyAttribute.cs
@@ -6,6 +6,7 @@
 using System.Web.Http;
 using System.Web.Http.Controllers;
 using System.Web.Http.Filters;
+using WebAPI;
 using WebAPI.Service;
 
 namespace project.Filter
@@ -53,7 +54,6 @@
             }
             var currentTs = (DateTime.UtcNow - new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc)).TotalSeconds;
             var diff = Math.Abs(currentTs - ts);
-
             if (diff > 300) // 300绉� = 5鍒嗛挓
             {
                 actionContext.Response = actionContext.Request.CreateResponse(System.Net.HttpStatusCode.BadRequest,
@@ -85,10 +85,9 @@
                 }
             }
             var signStr = rawData + "&timestamp=" + timestamp + "&nonce=" + nonce + "&key=" + SecretKey;
-
             var serverSign = ComputeHmacSha256(signStr, SecretKey);
 
-
+            
             if (serverSign != clientSign.ToUpper())
             {
                 actionContext.Response = actionContext.Request.CreateResponse(System.Net.HttpStatusCode.Unauthorized,

--
Gitblit v1.9.1