This commit is contained in:
@@ -132,7 +132,7 @@ See below, basically raven will check with rockfish automatically and handle any
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
"2018" KEY FORMAT
|
"8" KEY FORMAT
|
||||||
=================
|
=================
|
||||||
- JSON format
|
- JSON format
|
||||||
- secured with hash signature, only we can issue valid keys
|
- 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
|
- Rockfish will issue a trial key upon first request from empty db
|
||||||
- An empty regto is an invalid key.
|
- An empty regto is an invalid key.
|
||||||
- LicenseFormat
|
- 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
|
- 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
|
- Old future release versions should work with new licenses but not the reverse
|
||||||
|
|
||||||
|
|||||||
@@ -259,7 +259,7 @@ namespace AyaNova.Core
|
|||||||
// private static string SAMPLE_KEY = @"[KEY
|
// private static string SAMPLE_KEY = @"[KEY
|
||||||
// {
|
// {
|
||||||
// ""Key"": {
|
// ""Key"": {
|
||||||
// ""LicenseFormat"": ""2018"",
|
// ""LicenseFormat"": ""8"",
|
||||||
// ""Id"": ""34-1516288681"", <----Customer id followed by key serial id
|
// ""Id"": ""34-1516288681"", <----Customer id followed by key serial id
|
||||||
// ""RegisteredTo"": ""Super TestCo"", or "REVOKED" if revoked
|
// ""RegisteredTo"": ""Super TestCo"", or "REVOKED" if revoked
|
||||||
// ""DBID"": ""df558559-7f8a-4c7b-955c-959ebcdf71f3"",
|
// ""DBID"": ""df558559-7f8a-4c7b-955c-959ebcdf71f3"",
|
||||||
@@ -794,7 +794,7 @@ EQIDAQAB
|
|||||||
Newtonsoft.Json.Linq.JToken token = Newtonsoft.Json.Linq.JObject.Parse(keyNoWS);
|
Newtonsoft.Json.Linq.JToken token = Newtonsoft.Json.Linq.JObject.Parse(keyNoWS);
|
||||||
|
|
||||||
key.LicenseFormat = (string)token.SelectToken("Key.LicenseFormat");
|
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");
|
throw new ApplicationException($"E1020 - License.Parse -> License key format {key.LicenseFormat} not recognized");
|
||||||
key.Id = (string)token.SelectToken("Key.Id");
|
key.Id = (string)token.SelectToken("Key.Id");
|
||||||
key.RegisteredTo = (string)token.SelectToken("Key.RegisteredTo");
|
key.RegisteredTo = (string)token.SelectToken("Key.RegisteredTo");
|
||||||
|
|||||||
Reference in New Issue
Block a user