1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-18 01:03:35 +00:00

[PM-21611] Require userId on KeyService clear methods (#14788)

This commit is contained in:
Thomas Avery
2025-05-22 13:55:26 -05:00
committed by GitHub
parent 57911f210b
commit bd29397fd8
9 changed files with 41 additions and 35 deletions

View File

@@ -370,8 +370,9 @@ export abstract class KeyService {
* Note: This will remove the stored pin and as a result,
* disable pin protection for the user
* @param userId The desired user
* @throws Error when provided userId is null or undefined
*/
abstract clearPinKeys(userId?: string): Promise<void>;
abstract clearPinKeys(userId: UserId): Promise<void>;
/**
* @param keyMaterial The key material to derive the send key from
* @returns A new send key
@@ -380,8 +381,9 @@ export abstract class KeyService {
/**
* Clears all of the user's keys from storage
* @param userId The user's Id
* @throws Error when provided userId is null or undefined
*/
abstract clearKeys(userId?: string): Promise<any>;
abstract clearKeys(userId: UserId): Promise<void>;
abstract randomNumber(min: number, max: number): Promise<number>;
/**
* Generates a new cipher key