1
0
mirror of https://github.com/bitwarden/server.git synced 2025-04-08 06:28:14 -05:00

added refresh date to license files

This commit is contained in:
Kyle Spearrin 2017-08-15 14:58:17 -04:00
parent ea22cb1f79
commit b1443b4f94
3 changed files with 7 additions and 2 deletions

View File

@ -8,6 +8,7 @@ namespace Bit.Core.Models.Business
string LicenseKey { get; set; } string LicenseKey { get; set; }
int Version { get; set; } int Version { get; set; }
DateTime Issued { get; set; } DateTime Issued { get; set; }
DateTime? Refresh { get; set; }
DateTime? Expires { get; set; } DateTime? Expires { get; set; }
bool Trial { get; set; } bool Trial { get; set; }
string Signature { get; set; } string Signature { get; set; }

View File

@ -52,6 +52,7 @@ namespace Bit.Core.Models.Business
public bool SelfHost { get; set; } public bool SelfHost { get; set; }
public int Version { get; set; } public int Version { get; set; }
public DateTime Issued { get; set; } public DateTime Issued { get; set; }
public DateTime? Refresh { get; set; }
public DateTime? Expires { get; set; } public DateTime? Expires { get; set; }
public bool Trial { get; set; } public bool Trial { get; set; }
public string Signature { get; set; } public string Signature { get; set; }
@ -62,9 +63,10 @@ namespace Bit.Core.Models.Business
string data = null; string data = null;
if(Version == 1) if(Version == 1)
{ {
data = string.Format("organization:{0}_{1}_{2}_{3}_{4}_{5}_{6}_{7}_{8}_{9}_{10}_{11}_{12}_{13}_{14}", data = string.Format("organization:{0}_{1}_{2}_{3}_{4}_{5}_{6}_{7}_{8}_{9}_{10}_{11}_{12}_{13}_{14}_{15}",
Version, Version,
Utilities.CoreHelpers.ToEpocSeconds(Issued), Utilities.CoreHelpers.ToEpocSeconds(Issued),
Refresh.HasValue ? Utilities.CoreHelpers.ToEpocSeconds(Refresh.Value).ToString() : null,
Expires.HasValue ? Utilities.CoreHelpers.ToEpocSeconds(Expires.Value).ToString() : null, Expires.HasValue ? Utilities.CoreHelpers.ToEpocSeconds(Expires.Value).ToString() : null,
LicenseKey, LicenseKey,
InstallationId, InstallationId,

View File

@ -35,6 +35,7 @@ namespace Bit.Core.Models.Business
public short? MaxStorageGb { get; set; } public short? MaxStorageGb { get; set; }
public int Version { get; set; } public int Version { get; set; }
public DateTime Issued { get; set; } public DateTime Issued { get; set; }
public DateTime? Refresh { get; set; }
public DateTime? Expires { get; set; } public DateTime? Expires { get; set; }
public bool Trial { get; set; } public bool Trial { get; set; }
public string Signature { get; set; } public string Signature { get; set; }
@ -46,9 +47,10 @@ namespace Bit.Core.Models.Business
string data = null; string data = null;
if(Version == 1) if(Version == 1)
{ {
data = string.Format("user:{0}_{1}_{2}_{3}_{4}_{5}_{6}_{7}_{8}", data = string.Format("user:{0}_{1}_{2}_{3}_{4}_{5}_{6}_{7}_{8}_{9}",
Version, Version,
Utilities.CoreHelpers.ToEpocSeconds(Issued), Utilities.CoreHelpers.ToEpocSeconds(Issued),
Refresh.HasValue ? Utilities.CoreHelpers.ToEpocSeconds(Refresh.Value).ToString() : null,
Expires.HasValue ? Utilities.CoreHelpers.ToEpocSeconds(Expires.Value).ToString() : null, Expires.HasValue ? Utilities.CoreHelpers.ToEpocSeconds(Expires.Value).ToString() : null,
LicenseKey, LicenseKey,
Trial, Trial,