subscription license code additions

This commit is contained in:
2022-08-17 00:26:09 +00:00
parent abc59bae07
commit e6c739658a

View File

@@ -535,7 +535,12 @@ namespace AyaNova.Core
#if (DEBUG)
if (devTestTrial)
{
LicenseUrlParameter += "?dtt=true";//signal to rockfish to provide a key immediately for dev testing
#if (SUBSCRIPTION_BUILD)
LicenseUrlParameter += "?dtt=true&pp=false";//signal to rockfish to provide a key immediately for dev testing
#else
LicenseUrlParameter += "?dtt=true&pp=true";//signal to rockfish to provide a key immediately for dev testing
#endif
}
#endif
@@ -839,6 +844,7 @@ namespace AyaNova.Core
throw new ApplicationException("E1020 - License.Parse -> License key is empty and can't be validated");
}
try
{
if (!k.Contains("[KEY") ||
@@ -892,8 +898,10 @@ EQIDAQAB
key.Id = (string)token.SelectToken("Key.Id");
key.RegisteredTo = (string)token.SelectToken("Key.RegisteredTo");
key.DbId = (string)token.SelectToken("Key.DBID");
key.Perpetual = (bool)token.SelectToken("Key.Perpetual");
if (key.DbId != ServerDbId)
throw new ApplicationException($"E1020 - License.Parse -> License key does not match this server");
key.LicenseExpiration = (DateTime)token.SelectToken("Key.LicenseExpiration");
key.MaintenanceExpiration = (DateTime)token.SelectToken("Key.MaintenanceExpiration");