jwt token expiration time (asp.net core)

前端 未结 3 1778
青春惊慌失措
青春惊慌失措 2021-01-27 07:21

I\'d like to increase the lifetime of JWT token but I can\'t.

I tried googling the matter and found references to JwtBearerOptions.TokenValidationParameters.ClockS

3条回答
  •  心在旅途
    2021-01-27 07:53

    var token = new JwtSecurityToken(_config["Jwt:Issuer"], _config["Jwt:Issuer"],  
     claims, expires: DateTime.Now.AddMinutes(120) 
    

提交回复
热议问题