using Microsoft.IdentityModel.Tokens;
using System.Collections.Generic;
using System.Data.Entity;
using System.IdentityModel.Tokens.Jwt;
using System.Security.Claims;
using System.Threading.Tasks;
public static void Main()
var key = new SymmetricSecurityKey(Encoding.UTF8.GetBytes("7b88721f1a1cf86d6b0969f6c20b5eef"));
var credentials = new SigningCredentials(key, SecurityAlgorithms.HmacSha256, SecurityAlgorithms.Sha256Digest);
TimeSpan t = DateTime.UtcNow - new DateTime(1970, 1, 1);
int secondsSinceEpoch = (int)t.TotalSeconds;
var claimsToAdd = new List<Claim> {
new Claim("jti", Guid.NewGuid().ToString()),
new Claim("iat", secondsSinceEpoch.ToString(), ClaimValueTypes.Integer64),
new Claim("account", "zeel_solutions")
var jwtToken = new JwtSecurityToken(
expires: DateTime.Now.AddDays(364).ToUniversalTime(),
signingCredentials: credentials
Console.WriteLine(new JwtSecurityTokenHandler().WriteToken(jwtToken));