mirror of
https://github.com/bitwarden/browser
synced 2025-12-17 08:43:33 +00:00
Add comments (#17177)
This commit is contained in:
@@ -22,13 +22,15 @@ export class MasterPasswordUnlockResponse extends BaseResponse {
|
||||
|
||||
this.kdf = new KdfConfigResponse(this.getResponseProperty("Kdf"));
|
||||
|
||||
const masterKeyEncryptedUserKey = this.getResponseProperty("MasterKeyEncryptedUserKey");
|
||||
if (masterKeyEncryptedUserKey == null || typeof masterKeyEncryptedUserKey !== "string") {
|
||||
// Note: MasterKeyEncryptedUserKey and masterKeyWrappedUserKey are the same thing, and
|
||||
// used inconsistently in the codebase
|
||||
const masterKeyWrappedUserKey = this.getResponseProperty("MasterKeyEncryptedUserKey");
|
||||
if (masterKeyWrappedUserKey == null || typeof masterKeyWrappedUserKey !== "string") {
|
||||
throw new Error(
|
||||
"MasterPasswordUnlockResponse does not contain a valid master key encrypted user key",
|
||||
);
|
||||
}
|
||||
this.masterKeyWrappedUserKey = masterKeyEncryptedUserKey as MasterKeyWrappedUserKey;
|
||||
this.masterKeyWrappedUserKey = masterKeyWrappedUserKey as MasterKeyWrappedUserKey;
|
||||
}
|
||||
|
||||
toMasterPasswordUnlockData() {
|
||||
|
||||
Reference in New Issue
Block a user