using Microsoft.IdentityModel.Tokens;
using System.IdentityModel.Tokens.Jwt;
public static void Main()
var securityKey = new SymmetricSecurityKey(Encoding.UTF8.GetBytes("B88W85LRnrd82BsDT4wyvlLo5GMGIAGC"));
var credentials = new SigningCredentials(securityKey, SecurityAlgorithms.HmacSha256);
var token = new JwtSecurityToken("DiSale",
expires: DateTime.Now.AddYears(17),
signingCredentials: credentials);
Console.WriteLine(new JwtSecurityTokenHandler().WriteToken(token));