调整过期时间
parent
ea50a2d266
commit
b9048dfca1
|
|
@ -118,7 +118,7 @@ namespace New_College.AuthHelper.OverWrite
|
||||||
new Claim(JwtRegisteredClaimNames.Nbf,$"{new DateTimeOffset(DateTime.Now).ToUnixTimeSeconds()}") ,
|
new Claim(JwtRegisteredClaimNames.Nbf,$"{new DateTimeOffset(DateTime.Now).ToUnixTimeSeconds()}") ,
|
||||||
//这个就是过期时间,目前是过期1000秒,可自定义,注意JWT有自己的缓冲过期时间
|
//这个就是过期时间,目前是过期1000秒,可自定义,注意JWT有自己的缓冲过期时间
|
||||||
new Claim (JwtRegisteredClaimNames.Exp,$"{new DateTimeOffset(DateTime.Now.AddDays(7)).ToUnixTimeSeconds()}"),
|
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.Iss,iss),
|
||||||
new Claim(JwtRegisteredClaimNames.Aud,aud),
|
new Claim(JwtRegisteredClaimNames.Aud,aud),
|
||||||
new Claim(JwtRegisteredClaimNames.Name,tokenModel.NickName),
|
new Claim(JwtRegisteredClaimNames.Name,tokenModel.NickName),
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue