mirror of
https://github.com/bitwarden/server
synced 2025-12-15 07:43:54 +00:00
* Init ClientSecret migration * Fix unit tests * Move to src/Sql/dbo_future * Formatting changes * Update migration date for next release * Swap to just executing sp_refreshview * Fix formatting * Add EF Migrations * Rename to ClientSecretHash * Fix unit test * EF column rename * Batch the migration * Fix formatting * Add deprecation notice to property * Move data migration * Swap to CREATE OR ALTER
40 lines
1021 B
C#
40 lines
1021 B
C#
using Bit.Core.SecretsManager.Entities;
|
|
|
|
namespace Bit.Core.SecretsManager.Models.Data;
|
|
|
|
public class ApiKeyDetails : ApiKey
|
|
{
|
|
public string ClientSecret { get; set; } // Deprecated as of 2023-05-17
|
|
|
|
protected ApiKeyDetails() { }
|
|
|
|
protected ApiKeyDetails(ApiKey apiKey)
|
|
{
|
|
Id = apiKey.Id;
|
|
ServiceAccountId = apiKey.ServiceAccountId;
|
|
Name = apiKey.Name;
|
|
ClientSecretHash = apiKey.ClientSecretHash;
|
|
Scope = apiKey.Scope;
|
|
EncryptedPayload = apiKey.EncryptedPayload;
|
|
Key = apiKey.Key;
|
|
ExpireAt = apiKey.ExpireAt;
|
|
CreationDate = apiKey.CreationDate;
|
|
RevisionDate = apiKey.RevisionDate;
|
|
}
|
|
}
|
|
|
|
public class ServiceAccountApiKeyDetails : ApiKeyDetails
|
|
{
|
|
public ServiceAccountApiKeyDetails()
|
|
{
|
|
|
|
}
|
|
|
|
public ServiceAccountApiKeyDetails(ApiKey apiKey, Guid organizationId) : base(apiKey)
|
|
{
|
|
ServiceAccountOrganizationId = organizationId;
|
|
}
|
|
|
|
public Guid ServiceAccountOrganizationId { get; set; }
|
|
}
|