using System.Collections.Generic;
using System.Globalization;
public static void Main()
DateTime currentTime = DateTime.Now;
DateTime tenMinsLater = currentTime.AddMinutes(10);
var unixTime = tenMinsLater.ToUniversalTime() -
new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc);
var payload = new Dictionary<string, object>
{ "iss", "jpat26Ayc1AbiuQt-I7raadiodecPjJZ" },
IJwtAlgorithm algorithm = new HMACSHA512Algorithm();
IJsonSerializer serializer = new JsonNetSerializer();
IBase64UrlEncoder urlEncoder = new JwtBase64UrlEncoder();
IJwtEncoder encoder = new JwtEncoder(algorithm, serializer, urlEncoder);
var token = encoder.Encode(payload, "3LejIbPzUs-rGVteinLJNZO0uvr_ymNbHOOtJ7hmq7JvOEsHwfEGpP3-hXEHNn7l");
Console.WriteLine(token);