mirror of
https://github.com/bitwarden/jslib
synced 2025-12-06 00:03:29 +00:00
Expose getKeyFromStorage with userId (#633)
This commit is contained in:
@@ -21,7 +21,7 @@ export abstract class CryptoService {
|
|||||||
) => Promise<void>;
|
) => Promise<void>;
|
||||||
setProviderKeys: (orgs: ProfileProviderResponse[]) => Promise<void>;
|
setProviderKeys: (orgs: ProfileProviderResponse[]) => Promise<void>;
|
||||||
getKey: (keySuffix?: KeySuffixOptions, userId?: string) => Promise<SymmetricCryptoKey>;
|
getKey: (keySuffix?: KeySuffixOptions, userId?: string) => Promise<SymmetricCryptoKey>;
|
||||||
getKeyFromStorage: (keySuffix: KeySuffixOptions) => Promise<SymmetricCryptoKey>;
|
getKeyFromStorage: (keySuffix: KeySuffixOptions, userId?: string) => Promise<SymmetricCryptoKey>;
|
||||||
getKeyHash: () => Promise<string>;
|
getKeyHash: () => Promise<string>;
|
||||||
compareAndUpdateKeyHash: (masterPassword: string, key: SymmetricCryptoKey) => Promise<boolean>;
|
compareAndUpdateKeyHash: (masterPassword: string, key: SymmetricCryptoKey) => Promise<boolean>;
|
||||||
getEncKey: (key?: SymmetricCryptoKey) => Promise<SymmetricCryptoKey>;
|
getEncKey: (key?: SymmetricCryptoKey) => Promise<SymmetricCryptoKey>;
|
||||||
|
|||||||
@@ -38,9 +38,9 @@ export class ElectronCryptoService extends CryptoService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected async retrieveKeyFromStorage(keySuffix: KeySuffixOptions) {
|
protected async retrieveKeyFromStorage(keySuffix: KeySuffixOptions, userId?: string) {
|
||||||
await this.upgradeSecurelyStoredKey();
|
await this.upgradeSecurelyStoredKey();
|
||||||
return super.retrieveKeyFromStorage(keySuffix);
|
return super.retrieveKeyFromStorage(keySuffix, userId);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user