1
0
mirror of https://github.com/bitwarden/server.git synced 2025-06-20 02:48:03 -05:00

Attempt to fix tests

This commit is contained in:
Bernd Schoolmann 2025-06-05 18:15:33 +02:00
parent a0c25e12e4
commit ce3168ede1
No known key found for this signature in database

View File

@ -1,4 +1,5 @@
using Bit.Core.KeyManagement.Models.Data;
using System.Text.Json.Serialization;
using Bit.Core.KeyManagement.Models.Data;
using Bit.Core.Models.Api;
namespace Bit.Api.KeyManagement.Models.Response;
@ -28,6 +29,14 @@ public class PrivateKeysResponseModel : ResponseModel
}
}
[JsonConstructor]
public PrivateKeysResponseModel(SignatureKeyPairResponseModel? signatureKeyPair, PublicKeyEncryptionKeyPairModel publicKeyEncryptionKeyPair)
: base("privateKeys")
{
SignatureKeyPair = signatureKeyPair;
PublicKeyEncryptionKeyPair = publicKeyEncryptionKeyPair ?? throw new ArgumentNullException(nameof(publicKeyEncryptionKeyPair));
}
// Not all accounts have signature keys, but all accounts have public encryption keys.
public SignatureKeyPairResponseModel? SignatureKeyPair { get; set; }
public required PublicKeyEncryptionKeyPairModel PublicKeyEncryptionKeyPair { get; set; }