This commit is contained in:
2022-03-04 20:24:42 +00:00
parent ba8e447f6a
commit 353a6072be
3 changed files with 12 additions and 7 deletions

View File

@@ -666,7 +666,7 @@ namespace AyaNova.Api.Controllers
//generate an internal JWT key for reporting purposes used by corejobnotify to send reports as manager account
internal static string GenRpt()
internal static string GenRpt(long overrideLanguageId)
{
byte[] secretKey = System.Text.Encoding.ASCII.GetBytes(ServerBootConfig.AYANOVA_JWT_SECRET);
var iat = new DateTimeOffset(DateTime.Now.ToUniversalTime(), TimeSpan.Zero);
@@ -676,7 +676,7 @@ namespace AyaNova.Api.Controllers
{ "exp", exp.ToUnixTimeSeconds().ToString() },//in payload exp must be in unix epoch time per standard
{ "iss", "ayanova.com" },
{ "id", "1"},
{ "j","1" }
{ "rpl",overrideLanguageId.ToString() }
};
return Jose.JWT.Encode(payload, secretKey, Jose.JwsAlgorithm.HS256);
}