1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-19 17:53:39 +00:00

Add support for Emergency Access (#204)

* Add support for Emergency Access

* Resolve review comments
This commit is contained in:
Oscar Hinton
2020-12-22 16:53:48 +01:00
committed by GitHub
parent 12321e53b9
commit 573eea66ee
22 changed files with 358 additions and 117 deletions

View File

@@ -2,6 +2,7 @@ import { IdentityData } from '../data/identityData';
import { CipherString } from './cipherString';
import Domain from './domainBase';
import { SymmetricCryptoKey } from './symmetricCryptoKey';
import { IdentityView } from '../view/identityView';
@@ -53,7 +54,7 @@ export class Identity extends Domain {
}, alreadyEncrypted, []);
}
decrypt(orgId: string): Promise<IdentityView> {
decrypt(orgId: string, encKey?: SymmetricCryptoKey): Promise<IdentityView> {
return this.decryptObj(new IdentityView(this), {
title: null,
firstName: null,
@@ -73,7 +74,7 @@ export class Identity extends Domain {
username: null,
passportNumber: null,
licenseNumber: null,
}, orgId);
}, orgId, encKey);
}
toIdentityData(): IdentityData {