1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-22 19:23:52 +00:00

[PM-6012] Added device identifier header when updating trust on key rotation (#7807)

This commit is contained in:
Todd Martin
2024-02-05 11:35:33 -05:00
committed by GitHub
parent 25711afaf6
commit 250e7c87e8
4 changed files with 16 additions and 5 deletions

View File

@@ -502,7 +502,7 @@ describe("deviceTrustCryptoService", () => {
await deviceTrustCryptoService.rotateDevicesTrust(fakeNewUserKey, "");
expect(devicesApiService.updateTrust).not.toBeCalled();
expect(devicesApiService.updateTrust).not.toHaveBeenCalled();
});
describe("is on a trusted device", () => {
@@ -579,7 +579,7 @@ describe("deviceTrustCryptoService", () => {
await deviceTrustCryptoService.rotateDevicesTrust(fakeNewUserKey, "my_password_hash");
expect(devicesApiService.updateTrust).toBeCalledWith(
expect(devicesApiService.updateTrust).toHaveBeenCalledWith(
matches((updateTrustModel: UpdateDevicesTrustRequest) => {
return (
updateTrustModel.currentDevice.encryptedPublicKey ===
@@ -587,6 +587,7 @@ describe("deviceTrustCryptoService", () => {
updateTrustModel.currentDevice.encryptedUserKey === "4.ZW5jcnlwdGVkdXNlcg=="
);
}),
expect.stringMatching("test_device_identifier"),
);
});
});