1
0
mirror of https://github.com/bitwarden/server synced 2026-01-20 09:23:28 +00:00

test(auth-validator): [PM-22975] Client Version Validator - WIP changes.

This commit is contained in:
Patrick Pimentel
2025-12-02 13:46:23 -05:00
parent 8f89694f07
commit 8b8694e589
13 changed files with 65 additions and 35 deletions

View File

@@ -3,6 +3,7 @@ using Bit.Core.Auth.Models.Api.Request.Accounts;
using Bit.Core.Enums;
using Bit.IntegrationTestCommon;
using Bit.IntegrationTestCommon.Factories;
using Bit.Test.Common.Constants;
using Microsoft.AspNetCore.Authentication.JwtBearer;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.TestHost;
@@ -58,10 +59,10 @@ public class EventsApplicationFactory : WebApplicationFactoryBase<Startup>
KdfIterations = AuthConstants.PBKDF2_ITERATIONS.Default,
UserAsymmetricKeys = new KeysRequestModel()
{
PublicKey = "public_key",
EncryptedPrivateKey = "private_key"
PublicKey = TestEncryptionConstants.PublicKey,
EncryptedPrivateKey = TestEncryptionConstants.V1EncryptedBase64
},
UserSymmetricKey = "sym_key",
UserSymmetricKey = TestEncryptionConstants.V1EncryptedBase64,
});
return await _identityApplicationFactory.TokenFromPasswordAsync(email, masterPasswordHash);