1
0
mirror of https://github.com/bitwarden/server synced 2025-12-29 22:54:00 +00:00

Comments and create async

This commit is contained in:
Bernd Schoolmann
2025-12-03 12:57:31 +01:00
parent 5fb55b74b1
commit 1dc63c435e
2 changed files with 5 additions and 1 deletions

View File

@@ -2,6 +2,10 @@
namespace Bit.Core.KeyManagement.Commands.Interfaces;
/// <summary>
/// Command to set account keys for a new user that does not have keys yet.
/// This is intended for the TDE and Key-connector account registration flows.
/// </summary>
public interface ISetAccountKeysForUserCommand
{
Task SetAccountKeysForUserAsync(Guid userId,

View File

@@ -39,7 +39,7 @@ public class SetAccountKeysForUserCommand : ISetAccountKeysForUserCommand
user.SignedPublicKey = accountKeysData.PublicKeyEncryptionKeyPairData.SignedPublicKey;
user.SecurityState = accountKeysData.SecurityStateData.SecurityState;
user.SecurityVersion = accountKeysData.SecurityStateData.SecurityVersion;
await _userSignatureKeyPairRepository.UpsertAsync(new UserSignatureKeyPair
await _userSignatureKeyPairRepository.CreateAsync(new UserSignatureKeyPair
{
Id = CoreHelpers.GenerateComb(),
UserId = userId,