mirror of
https://github.com/bitwarden/server.git
synced 2026-06-01 01:55:55 -05:00
Deprecating V1 User Asymmetric Key information in favor of new V2 User Asymmetric Account Keys structure. This PR adds support for the new AccountKeys structure while maintaining support for the legacy UserAsymmetricKey-based flow. Validation is updated to check either AccountKeys or UserAsymmetricKeys are updated. Tests include modeling for both scenarios.
20 lines
622 B
C#
20 lines
622 B
C#
using AutoFixture;
|
|
using Bit.Core.KeyManagement.Models.Api.Request;
|
|
using Bit.Test.Common.AutoFixture.Attributes;
|
|
|
|
namespace Bit.Test.Common.AutoFixture;
|
|
|
|
internal class SignatureKeyPairRequestModelCustomization : ICustomization
|
|
{
|
|
public void Customize(IFixture fixture)
|
|
{
|
|
fixture.Customize<SignatureKeyPairRequestModel>(composer => composer
|
|
.With(o => o.SignatureAlgorithm, "ed25519"));
|
|
}
|
|
}
|
|
|
|
public class SignatureKeyPairRequestModelCustomizeAttribute : BitCustomizeAttribute
|
|
{
|
|
public override ICustomization GetCustomization() => new SignatureKeyPairRequestModelCustomization();
|
|
}
|