18 lines
505 B
C#
18 lines
505 B
C#
using System.Text;
|
|
using Microsoft.IdentityModel.Tokens;
|
|
|
|
namespace NBF;
|
|
|
|
public static class ApiJwtHelper
|
|
{
|
|
public const string Issuer = "GameServer";
|
|
public const string Audience = "GameClient";
|
|
public const string Secret = "YourSuperSecretKeyForJwtTokenGeneration123!";
|
|
public static readonly TimeSpan TokenLifetime = TimeSpan.FromDays(1);
|
|
|
|
public static SymmetricSecurityKey CreateSigningKey()
|
|
{
|
|
return new SymmetricSecurityKey(Encoding.UTF8.GetBytes(Secret));
|
|
}
|
|
}
|