我正在使用Jwt安全令牌进行身份验证。
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace CodeStuff
{
public abstract class Automobile
{
public abstract void stuff();
}
public class Car : Automobile
{
public override void stuff()
{
Console.WriteLine("nice");
}
}
class Program
{
public static void CarStuff(Automobile b)
{
b.stuff();
}
static void Main(string[] args)
{
Type ReadType = Type.GetType("CodeStuff.Car");
Object obj = Activator.CreateInstance(ReadType);
CarStuff((Automobile)obj);
Console.ReadLine();
}
}
}
startup.cs
var token = new JwtSecurityToken(
issuer: "mysite.com",
audience: "mysite.com",
notBefore: DateTime.Now,
expires: DateTime.Now.AddDays(1),
claims: claimsdata,
signingCredentials: signInCred
);
但是当我调试此代码时,我得到了以下时间
但是现在我的电脑时间是12:58 PM ....
请帮助我为令牌提供正确的到期时间。.