1
0
mirror of https://github.com/bitwarden/server.git synced 2025-06-30 15:42:48 -05:00

[SM-678] ClientSecret migration (#2943)

* 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
This commit is contained in:
Thomas Avery
2023-06-21 13:16:06 -05:00
committed by GitHub
parent 7f8b6c0bce
commit bb3a9daf98
24 changed files with 7011 additions and 41 deletions

View File

@ -1,6 +1,6 @@
#nullable enable
using Bit.Core.Models.Api;
using Bit.Core.SecretsManager.Entities;
using Bit.Core.SecretsManager.Models.Data;
namespace Bit.Api.SecretsManager.Models.Response;
@ -8,14 +8,14 @@ public class AccessTokenCreationResponseModel : ResponseModel
{
private const string _objectName = "accessTokenCreation";
public AccessTokenCreationResponseModel(ApiKey apiKey) : base(_objectName)
public AccessTokenCreationResponseModel(ApiKeyClientSecretDetails details) : base(_objectName)
{
Id = apiKey.Id;
Name = apiKey.Name;
ClientSecret = apiKey.ClientSecret;
ExpireAt = apiKey.ExpireAt;
CreationDate = apiKey.CreationDate;
RevisionDate = apiKey.RevisionDate;
Id = details.ApiKey.Id;
Name = details.ApiKey.Name;
ExpireAt = details.ApiKey.ExpireAt;
CreationDate = details.ApiKey.CreationDate;
RevisionDate = details.ApiKey.RevisionDate;
ClientSecret = details.ClientSecret;
}
public AccessTokenCreationResponseModel() : base(_objectName)