mirror of
https://github.com/bitwarden/browser
synced 2026-02-19 10:54:00 +00:00
Make set legacy state public
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { UserId } from "@bitwarden/user-core";
|
||||
|
||||
import { UserKey } from "../../../types/key";
|
||||
import { MasterPasswordUnlockData } from "../types/master-password.types";
|
||||
|
||||
export abstract class MasterPasswordUnlockService {
|
||||
/**
|
||||
@@ -24,4 +25,14 @@ export abstract class MasterPasswordUnlockService {
|
||||
* @returns true if the userKey can be decrypted, false otherwise.
|
||||
*/
|
||||
abstract proofOfDecryption(masterPassword: string, userId: UserId): Promise<boolean>;
|
||||
|
||||
/**
|
||||
* Previously unlocking had the side effect of setting the masterKey and masterPasswordHash in state.
|
||||
* This is to preserve that behavior, once masterKey and masterPasswordHash state is removed this should be removed as well.
|
||||
*/
|
||||
abstract setLegacyState(
|
||||
masterPassword: string,
|
||||
masterPasswordUnlockData: MasterPasswordUnlockData,
|
||||
userId: UserId,
|
||||
): Promise<void>;
|
||||
}
|
||||
|
||||
@@ -88,7 +88,7 @@ export class DefaultMasterPasswordUnlockService implements MasterPasswordUnlockS
|
||||
|
||||
// Previously unlocking had the side effect of setting the masterKey and masterPasswordHash in state.
|
||||
// This is to preserve that behavior, once masterKey and masterPasswordHash state is removed this should be removed as well.
|
||||
private async setLegacyState(
|
||||
async setLegacyState(
|
||||
masterPassword: string,
|
||||
masterPasswordUnlockData: MasterPasswordUnlockData,
|
||||
userId: UserId,
|
||||
|
||||
Reference in New Issue
Block a user