mirror of
https://github.com/bitwarden/browser
synced 2025-12-16 00:03:56 +00:00
[Provider] Add initial support for providers (#399)
This commit is contained in:
@@ -3,9 +3,12 @@ import { EncString } from '../models/domain/encString';
|
||||
import { SymmetricCryptoKey } from '../models/domain/symmetricCryptoKey';
|
||||
|
||||
import { ProfileOrganizationResponse } from '../models/response/profileOrganizationResponse';
|
||||
import { ProfileProviderOrganizationResponse } from '../models/response/profileProviderOrganizationResponse';
|
||||
import { ProfileProviderResponse } from '../models/response/profileProviderResponse';
|
||||
|
||||
import { HashPurpose } from '../enums/hashPurpose';
|
||||
import { KdfType } from '../enums/kdfType';
|
||||
|
||||
import { KeySuffixOptions } from './storage.service';
|
||||
|
||||
export abstract class CryptoService {
|
||||
@@ -13,7 +16,8 @@ export abstract class CryptoService {
|
||||
setKeyHash: (keyHash: string) => Promise<{}>;
|
||||
setEncKey: (encKey: string) => Promise<{}>;
|
||||
setEncPrivateKey: (encPrivateKey: string) => Promise<{}>;
|
||||
setOrgKeys: (orgs: ProfileOrganizationResponse[]) => Promise<{}>;
|
||||
setOrgKeys: (orgs: ProfileOrganizationResponse[], providerOrgs: ProfileProviderOrganizationResponse[]) => Promise<{}>;
|
||||
setProviderKeys: (orgs: ProfileProviderResponse[]) => Promise<{}>;
|
||||
getKey: (keySuffix?: KeySuffixOptions) => Promise<SymmetricCryptoKey>;
|
||||
getKeyFromStorage: (keySuffix: KeySuffixOptions) => Promise<SymmetricCryptoKey>;
|
||||
getKeyHash: () => Promise<string>;
|
||||
@@ -24,6 +28,7 @@ export abstract class CryptoService {
|
||||
getFingerprint: (userId: string, publicKey?: ArrayBuffer) => Promise<string[]>;
|
||||
getOrgKeys: () => Promise<Map<string, SymmetricCryptoKey>>;
|
||||
getOrgKey: (orgId: string) => Promise<SymmetricCryptoKey>;
|
||||
getProviderKey: (providerId: string) => Promise<SymmetricCryptoKey>;
|
||||
hasKey: () => Promise<boolean>;
|
||||
hasKeyInMemory: () => boolean;
|
||||
hasKeyStored: (keySuffix?: KeySuffixOptions) => Promise<boolean>;
|
||||
@@ -33,6 +38,7 @@ export abstract class CryptoService {
|
||||
clearEncKey: (memoryOnly?: boolean) => Promise<any>;
|
||||
clearKeyPair: (memoryOnly?: boolean) => Promise<any>;
|
||||
clearOrgKeys: (memoryOnly?: boolean) => Promise<any>;
|
||||
clearProviderKeys: (memoryOnly?: boolean) => Promise<any>;
|
||||
clearPinProtectedKey: () => Promise<any>;
|
||||
clearKeys: () => Promise<any>;
|
||||
toggleKey: () => Promise<any>;
|
||||
|
||||
Reference in New Issue
Block a user