1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-08 12:40:26 +00:00

Undo changes

This commit is contained in:
Bernd Schoolmann
2025-10-23 16:31:43 +02:00
parent c17db55c7f
commit 4a5aeb2198
4 changed files with 4 additions and 9 deletions

View File

@@ -494,7 +494,6 @@ export class ServiceContainer {
this.masterPasswordUnlockService = new DefaultMasterPasswordUnlockService(
this.masterPasswordService,
this.keyService,
this.kdfConfigService,
);
this.appIdService = new AppIdService(this.storageService, this.logService);

View File

@@ -1105,7 +1105,7 @@ const safeProviders: SafeProvider[] = [
safeProvider({
provide: MasterPasswordUnlockService,
useClass: DefaultMasterPasswordUnlockService,
deps: [InternalMasterPasswordServiceAbstraction, KeyService, KdfConfigService],
deps: [InternalMasterPasswordServiceAbstraction, KeyService],
}),
safeProvider({
provide: KeyConnectorServiceAbstraction,

View File

@@ -3,7 +3,7 @@ import { of } from "rxjs";
import { newGuid } from "@bitwarden/guid";
// eslint-disable-next-line no-restricted-imports
import { Argon2KdfConfig, KdfConfigService, KeyService } from "@bitwarden/key-management";
import { Argon2KdfConfig, KeyService } from "@bitwarden/key-management";
import { UserId } from "@bitwarden/user-core";
import { HashPurpose } from "../../../platform/enums";
@@ -23,7 +23,6 @@ describe("DefaultMasterPasswordUnlockService", () => {
let masterPasswordService: MockProxy<InternalMasterPasswordServiceAbstraction>;
let keyService: MockProxy<KeyService>;
let kdfService: MockProxy<KdfConfigService>;
const mockMasterPassword = "testExample";
const mockUserId = newGuid() as UserId;
@@ -42,9 +41,8 @@ describe("DefaultMasterPasswordUnlockService", () => {
beforeEach(() => {
masterPasswordService = mock<InternalMasterPasswordServiceAbstraction>();
keyService = mock<KeyService>();
kdfService = mock<KdfConfigService>();
sut = new DefaultMasterPasswordUnlockService(masterPasswordService, keyService, kdfService);
sut = new DefaultMasterPasswordUnlockService(masterPasswordService, keyService);
masterPasswordService.masterPasswordUnlockData$.mockReturnValue(
of(mockMasterPasswordUnlockData),

View File

@@ -1,7 +1,7 @@
import { firstValueFrom } from "rxjs";
// eslint-disable-next-line no-restricted-imports
import { KdfConfigService, KeyService } from "@bitwarden/key-management";
import { KeyService } from "@bitwarden/key-management";
import { UserId } from "@bitwarden/user-core";
import { HashPurpose } from "../../../platform/enums";
@@ -14,7 +14,6 @@ export class DefaultMasterPasswordUnlockService implements MasterPasswordUnlockS
constructor(
private readonly masterPasswordService: InternalMasterPasswordServiceAbstraction,
private readonly keyService: KeyService,
private readonly kdfService: KdfConfigService,
) {}
async unlockWithMasterPassword(masterPassword: string, userId: UserId): Promise<UserKey> {
@@ -72,6 +71,5 @@ export class DefaultMasterPasswordUnlockService implements MasterPasswordUnlockS
await this.masterPasswordService.setMasterKeyHash(localKeyHash, userId);
await this.masterPasswordService.setMasterKey(masterKey, userId);
await this.kdfService.setKdfConfig(userId, masterPasswordUnlockData.kdf);
}
}