This commit is contained in:
2020-06-17 17:59:34 +00:00
parent 17f8a9058d
commit d4ab6a9e34
2 changed files with 4 additions and 4 deletions

View File

@@ -132,7 +132,7 @@ See below, basically raven will check with rockfish automatically and handle any
"2018" KEY FORMAT
"8" KEY FORMAT
=================
- JSON format
- secured with hash signature, only we can issue valid keys
@@ -157,7 +157,7 @@ See below, basically raven will check with rockfish automatically and handle any
- Rockfish will issue a trial key upon first request from empty db
- An empty regto is an invalid key.
- LicenseFormat
- there will be a LicenseFormat version field which will be initially "2018"
- there will be a LicenseFormat version field which will be initially "8"
- This is for future changes to how license is formatted to ease the code burden of detecting that
- Old future release versions should work with new licenses but not the reverse

View File

@@ -259,7 +259,7 @@ namespace AyaNova.Core
// private static string SAMPLE_KEY = @"[KEY
// {
// ""Key"": {
// ""LicenseFormat"": ""2018"",
// ""LicenseFormat"": ""8"",
// ""Id"": ""34-1516288681"", <----Customer id followed by key serial id
// ""RegisteredTo"": ""Super TestCo"", or "REVOKED" if revoked
// ""DBID"": ""df558559-7f8a-4c7b-955c-959ebcdf71f3"",
@@ -794,7 +794,7 @@ EQIDAQAB
Newtonsoft.Json.Linq.JToken token = Newtonsoft.Json.Linq.JObject.Parse(keyNoWS);
key.LicenseFormat = (string)token.SelectToken("Key.LicenseFormat");
if (key.LicenseFormat != "2018")
if (key.LicenseFormat != "8")
throw new ApplicationException($"E1020 - License.Parse -> License key format {key.LicenseFormat} not recognized");
key.Id = (string)token.SelectToken("Key.Id");
key.RegisteredTo = (string)token.SelectToken("Key.RegisteredTo");