mirror of
https://github.com/bitwarden/server.git
synced 2025-06-20 02:48:03 -05:00
Attempt to fix build
This commit is contained in:
parent
ce3168ede1
commit
af976cd515
@ -1,14 +1,32 @@
|
||||
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;
|
||||
|
||||
[method: System.Diagnostics.CodeAnalysis.SetsRequiredMembersAttribute]
|
||||
#nullable enable
|
||||
|
||||
public class PublicKeyEncryptionKeyPairModel(PublicKeyEncryptionKeyPairData keyPair) : ResponseModel("publicKeyEncryptionKeyPair")
|
||||
public class PublicKeyEncryptionKeyPairModel : ResponseModel
|
||||
{
|
||||
public required string WrappedPrivateKey { get; set; } = keyPair.WrappedPrivateKey;
|
||||
public required string PublicKey { get; set; } = keyPair.PublicKey;
|
||||
public string? SignedPublicKey { get; set; } = keyPair.SignedPublicKey;
|
||||
public required string WrappedPrivateKey { get; set; }
|
||||
public required string PublicKey { get; set; }
|
||||
public string? SignedPublicKey { get; set; }
|
||||
|
||||
[System.Diagnostics.CodeAnalysis.SetsRequiredMembersAttribute]
|
||||
public PublicKeyEncryptionKeyPairModel(PublicKeyEncryptionKeyPairData keyPair)
|
||||
: base("publicKeyEncryptionKeyPair")
|
||||
{
|
||||
WrappedPrivateKey = keyPair.WrappedPrivateKey;
|
||||
PublicKey = keyPair.PublicKey;
|
||||
SignedPublicKey = keyPair.SignedPublicKey;
|
||||
}
|
||||
|
||||
[JsonConstructor]
|
||||
public PublicKeyEncryptionKeyPairModel(string wrappedPrivateKey, string publicKey, string? signedPublicKey)
|
||||
: base("publicKeyEncryptionKeyPair")
|
||||
{
|
||||
WrappedPrivateKey = wrappedPrivateKey ?? throw new ArgumentNullException(nameof(wrappedPrivateKey));
|
||||
PublicKey = publicKey ?? throw new ArgumentNullException(nameof(publicKey));
|
||||
SignedPublicKey = signedPublicKey;
|
||||
}
|
||||
}
|
||||
|
@ -1,13 +1,35 @@
|
||||
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;
|
||||
|
||||
[method: System.Diagnostics.CodeAnalysis.SetsRequiredMembersAttribute]
|
||||
#nullable enable
|
||||
|
||||
public class SignatureKeyPairResponseModel(SignatureKeyPairData signatureKeyPair) : ResponseModel("signatureKeyPair")
|
||||
public class SignatureKeyPairResponseModel : ResponseModel
|
||||
{
|
||||
public required string WrappedSigningKey { get; set; } = signatureKeyPair.WrappedSigningKey;
|
||||
public required string VerifyingKey { get; set; } = signatureKeyPair.VerifyingKey;
|
||||
public required string WrappedSigningKey;
|
||||
public required string VerifyingKey;
|
||||
|
||||
[System.Diagnostics.CodeAnalysis.SetsRequiredMembersAttribute]
|
||||
public SignatureKeyPairResponseModel(SignatureKeyPairData signatureKeyPair)
|
||||
: base("signatureKeyPair")
|
||||
{
|
||||
if (signatureKeyPair == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(signatureKeyPair));
|
||||
}
|
||||
|
||||
WrappedSigningKey = signatureKeyPair.WrappedSigningKey;
|
||||
VerifyingKey = signatureKeyPair.VerifyingKey;
|
||||
}
|
||||
|
||||
|
||||
[JsonConstructor]
|
||||
public SignatureKeyPairResponseModel(string wrappedSigningKey, string verifyingKey)
|
||||
: base("signatureKeyPair")
|
||||
{
|
||||
WrappedSigningKey = wrappedSigningKey ?? throw new ArgumentNullException(nameof(wrappedSigningKey));
|
||||
VerifyingKey = verifyingKey ?? throw new ArgumentNullException(nameof(verifyingKey));
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user