1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-04 09:32:48 -05:00

Reference id storage and signup

This commit is contained in:
Chad Scharf
2020-06-25 12:28:22 -04:00
parent f23a8edc45
commit fca7b162bf
11 changed files with 472 additions and 6 deletions

View File

@ -467,11 +467,12 @@ namespace Bit.Core.Services
UsersGetPremium = plan.UsersGetPremium || signup.PremiumAccessAddon,
Plan = plan.Name,
Gateway = null,
ReferenceId = signup.Owner.ReferenceId,
Enabled = true,
LicenseKey = CoreHelpers.SecureRandomString(20),
ApiKey = CoreHelpers.SecureRandomString(30),
CreationDate = DateTime.UtcNow,
RevisionDate = DateTime.UtcNow
RevisionDate = DateTime.UtcNow,
};
if (plan.Type == PlanType.Free)
@ -541,6 +542,7 @@ namespace Bit.Core.Services
Gateway = null,
GatewayCustomerId = null,
GatewaySubscriptionId = null,
ReferenceId = owner.ReferenceId,
Enabled = license.Enabled,
ExpirationDate = license.Expires,
LicenseKey = license.LicenseKey,