From b9048dfca12549459b40ce62efea5c497476c4b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?old=E6=98=93?= <156663459@qq.com> Date: Thu, 14 Nov 2024 10:14:14 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E8=BF=87=E6=9C=9F=E6=97=B6?= =?UTF-8?q?=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- New_College.Extensions/Authorizations/OverWrite/JwtHelper.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/New_College.Extensions/Authorizations/OverWrite/JwtHelper.cs b/New_College.Extensions/Authorizations/OverWrite/JwtHelper.cs index 6bfd5c6..323cf56 100644 --- a/New_College.Extensions/Authorizations/OverWrite/JwtHelper.cs +++ b/New_College.Extensions/Authorizations/OverWrite/JwtHelper.cs @@ -118,7 +118,7 @@ namespace New_College.AuthHelper.OverWrite new Claim(JwtRegisteredClaimNames.Nbf,$"{new DateTimeOffset(DateTime.Now).ToUnixTimeSeconds()}") , //这个就是过期时间,目前是过期1000秒,可自定义,注意JWT有自己的缓冲过期时间 new Claim (JwtRegisteredClaimNames.Exp,$"{new DateTimeOffset(DateTime.Now.AddDays(7)).ToUnixTimeSeconds()}"), - new Claim(ClaimTypes.Expiration, DateTime.Now.AddDays(1000).ToString()), + new Claim(ClaimTypes.Expiration, DateTime.Now.AddDays(7).ToString()), new Claim(JwtRegisteredClaimNames.Iss,iss), new Claim(JwtRegisteredClaimNames.Aud,aud), new Claim(JwtRegisteredClaimNames.Name,tokenModel.NickName),