mirror of
https://github.com/bitwarden/browser
synced 2025-12-19 09:43:23 +00:00
[SG-998] and [SG-999] Vault and Autofill team refactor (#4542)
* Move DeprecatedVaultFilterService to vault folder * [libs] move VaultItemsComponent * [libs] move AddEditComponent * [libs] move AddEditCustomFields * [libs] move attachmentsComponent * [libs] folderAddEditComponent * [libs] IconComponent * [libs] PasswordRepormptComponent * [libs] PremiumComponent * [libs] ViewCustomFieldsComponent * [libs] ViewComponent * [libs] PasswordRepromptService * [libs] Move FolderService and FolderApiService abstractions * [libs] FolderService imports * [libs] PasswordHistoryComponent * [libs] move Sync and SyncNotifier abstractions * [libs] SyncService imports * [libs] fix file casing for passwordReprompt abstraction * [libs] SyncNotifier import fix * [libs] CipherServiceAbstraction * [libs] PasswordRepromptService abstraction * [libs] Fix file casing for angular passwordReprompt service * [libs] fix file casing for SyncNotifierService * [libs] CipherRepromptType * [libs] rename CipherRepromptType * [libs] CipherType * [libs] Rename CipherType * [libs] CipherData * [libs] FolderData * [libs] PasswordHistoryData * [libs] AttachmentData * [libs] CardData * [libs] FieldData * [libs] IdentityData * [libs] LocalData * [libs] LoginData * [libs] SecureNoteData * [libs] LoginUriData * [libs] Domain classes * [libs] SecureNote * [libs] Request models * [libs] Response models * [libs] View part 1 * [libs] Views part 2 * [libs] Move folder services * [libs] Views fixes * [libs] Move sync services * [libs] cipher service * [libs] Types * [libs] Sync file casing * [libs] Fix folder service import * [libs] Move spec files * [libs] casing fixes on spec files * [browser] Autofill background, clipboard, commands * [browser] Fix ContextMenusBackground casing * [browser] Rename fix * [browser] Autofill content * [browser] autofill.js * [libs] enpass importer spec fix * [browser] autofill models * [browser] autofill manifest path updates * [browser] Autofill notification files * [browser] autofill services * [browser] Fix file casing * [browser] Vault popup loose components * [browser] Vault components * [browser] Manifest fixes * [browser] Vault services * [cli] vault commands and models * [browser] File capitilization fixes * [desktop] Vault components and services * [web] vault loose components * [web] Vault components * [browser] Fix misc-utils import * [libs] Fix psono spec imports * [fix] Add comments to address lint rules
This commit is contained in:
@@ -7,16 +7,7 @@ import { DeviceType } from "../enums/deviceType";
|
||||
import { OrganizationConnectionType } from "../enums/organizationConnectionType";
|
||||
import { Utils } from "../misc/utils";
|
||||
import { SetKeyConnectorKeyRequest } from "../models/request/account/set-key-connector-key.request";
|
||||
import { AttachmentRequest } from "../models/request/attachment.request";
|
||||
import { BitPayInvoiceRequest } from "../models/request/bit-pay-invoice.request";
|
||||
import { CipherBulkDeleteRequest } from "../models/request/cipher-bulk-delete.request";
|
||||
import { CipherBulkMoveRequest } from "../models/request/cipher-bulk-move.request";
|
||||
import { CipherBulkShareRequest } from "../models/request/cipher-bulk-share.request";
|
||||
import { CipherCollectionsRequest } from "../models/request/cipher-collections.request";
|
||||
import { CipherCreateRequest } from "../models/request/cipher-create.request";
|
||||
import { CipherPartialRequest } from "../models/request/cipher-partial.request";
|
||||
import { CipherShareRequest } from "../models/request/cipher-share.request";
|
||||
import { CipherRequest } from "../models/request/cipher.request";
|
||||
import { CollectionBulkDeleteRequest } from "../models/request/collection-bulk-delete.request";
|
||||
import { CollectionRequest } from "../models/request/collection.request";
|
||||
import { DeleteRecoverRequest } from "../models/request/delete-recover.request";
|
||||
@@ -82,14 +73,11 @@ import { UpdateTwoFactorYubioOtpRequest } from "../models/request/update-two-fac
|
||||
import { VerifyDeleteRecoverRequest } from "../models/request/verify-delete-recover.request";
|
||||
import { VerifyEmailRequest } from "../models/request/verify-email.request";
|
||||
import { ApiKeyResponse } from "../models/response/api-key.response";
|
||||
import { AttachmentUploadDataResponse } from "../models/response/attachment-upload-data.response";
|
||||
import { AttachmentResponse } from "../models/response/attachment.response";
|
||||
import { AuthRequestResponse } from "../models/response/auth-request.response";
|
||||
import { RegisterResponse } from "../models/response/authentication/register.response";
|
||||
import { BillingHistoryResponse } from "../models/response/billing-history.response";
|
||||
import { BillingPaymentResponse } from "../models/response/billing-payment.response";
|
||||
import { BreachAccountResponse } from "../models/response/breach-account.response";
|
||||
import { CipherResponse } from "../models/response/cipher.response";
|
||||
import {
|
||||
CollectionAccessDetailsResponse,
|
||||
CollectionResponse,
|
||||
@@ -138,7 +126,6 @@ import { SendFileUploadDataResponse } from "../models/response/send-file-upload-
|
||||
import { SendResponse } from "../models/response/send.response";
|
||||
import { SsoPreValidateResponse } from "../models/response/sso-pre-validate.response";
|
||||
import { SubscriptionResponse } from "../models/response/subscription.response";
|
||||
import { SyncResponse } from "../models/response/sync.response";
|
||||
import { TaxInfoResponse } from "../models/response/tax-info.response";
|
||||
import { TaxRateResponse } from "../models/response/tax-rate.response";
|
||||
import { TwoFactorAuthenticatorResponse } from "../models/response/two-factor-authenticator.response";
|
||||
@@ -153,6 +140,19 @@ import {
|
||||
import { TwoFactorYubiKeyResponse } from "../models/response/two-factor-yubi-key.response";
|
||||
import { UserKeyResponse } from "../models/response/user-key.response";
|
||||
import { SendAccessView } from "../models/view/send-access.view";
|
||||
import { AttachmentRequest } from "../vault/models/request/attachment.request";
|
||||
import { CipherBulkDeleteRequest } from "../vault/models/request/cipher-bulk-delete.request";
|
||||
import { CipherBulkMoveRequest } from "../vault/models/request/cipher-bulk-move.request";
|
||||
import { CipherBulkShareRequest } from "../vault/models/request/cipher-bulk-share.request";
|
||||
import { CipherCollectionsRequest } from "../vault/models/request/cipher-collections.request";
|
||||
import { CipherCreateRequest } from "../vault/models/request/cipher-create.request";
|
||||
import { CipherPartialRequest } from "../vault/models/request/cipher-partial.request";
|
||||
import { CipherShareRequest } from "../vault/models/request/cipher-share.request";
|
||||
import { CipherRequest } from "../vault/models/request/cipher.request";
|
||||
import { AttachmentUploadDataResponse } from "../vault/models/response/attachment-upload-data.response";
|
||||
import { AttachmentResponse } from "../vault/models/response/attachment.response";
|
||||
import { CipherResponse } from "../vault/models/response/cipher.response";
|
||||
import { SyncResponse } from "../vault/models/response/sync.response";
|
||||
|
||||
/**
|
||||
* @deprecated The `ApiService` class is deprecated and calls should be extracted into individual
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,8 +1,8 @@
|
||||
import { Jsonify } from "type-fest";
|
||||
|
||||
import { InitializerMetadata } from "../../interfaces/initializer-metadata.interface";
|
||||
import { Cipher } from "../../models/domain/cipher";
|
||||
import { CipherView } from "../../models/view/cipher.view";
|
||||
import { Cipher } from "../../vault/models/domain/cipher";
|
||||
import { CipherView } from "../../vault/models/view/cipher.view";
|
||||
|
||||
import { InitializerKey } from "./initializer-key";
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { CipherService } from "../../abstractions/cipher.service";
|
||||
import { EventCollectionService as EventCollectionServiceAbstraction } from "../../abstractions/event/event-collection.service";
|
||||
import { EventUploadService } from "../../abstractions/event/event-upload.service";
|
||||
import { OrganizationService } from "../../abstractions/organization/organization.service.abstraction";
|
||||
import { StateService } from "../../abstractions/state.service";
|
||||
import { EventType } from "../../enums/eventType";
|
||||
import { EventData } from "../../models/data/event.data";
|
||||
import { CipherService } from "../../vault/abstractions/cipher.service";
|
||||
|
||||
export class EventCollectionService implements EventCollectionServiceAbstraction {
|
||||
constructor(
|
||||
|
||||
@@ -1,32 +1,32 @@
|
||||
import * as papa from "papaparse";
|
||||
|
||||
import { ApiService } from "../abstractions/api.service";
|
||||
import { CipherService } from "../abstractions/cipher.service";
|
||||
import { CryptoService } from "../abstractions/crypto.service";
|
||||
import { CryptoFunctionService } from "../abstractions/cryptoFunction.service";
|
||||
import {
|
||||
ExportFormat,
|
||||
ExportService as ExportServiceAbstraction,
|
||||
} from "../abstractions/export.service";
|
||||
import { FolderService } from "../abstractions/folder/folder.service.abstraction";
|
||||
import { CipherType } from "../enums/cipherType";
|
||||
import { DEFAULT_PBKDF2_ITERATIONS, KdfType } from "../enums/kdfType";
|
||||
import { Utils } from "../misc/utils";
|
||||
import { CipherData } from "../models/data/cipher.data";
|
||||
import { CollectionData } from "../models/data/collection.data";
|
||||
import { Cipher } from "../models/domain/cipher";
|
||||
import { Collection } from "../models/domain/collection";
|
||||
import { Folder } from "../models/domain/folder";
|
||||
import { KdfConfig } from "../models/domain/kdf-config";
|
||||
import { CipherWithIdExport as CipherExport } from "../models/export/cipher-with-ids.export";
|
||||
import { CollectionWithIdExport as CollectionExport } from "../models/export/collection-with-id.export";
|
||||
import { EventExport } from "../models/export/event.export";
|
||||
import { FolderWithIdExport as FolderExport } from "../models/export/folder-with-id.export";
|
||||
import { CollectionDetailsResponse } from "../models/response/collection.response";
|
||||
import { CipherView } from "../models/view/cipher.view";
|
||||
import { CollectionView } from "../models/view/collection.view";
|
||||
import { EventView } from "../models/view/event.view";
|
||||
import { FolderView } from "../models/view/folder.view";
|
||||
import { CipherService } from "../vault/abstractions/cipher.service";
|
||||
import { FolderService } from "../vault/abstractions/folder/folder.service.abstraction";
|
||||
import { CipherType } from "../vault/enums/cipher-type";
|
||||
import { CipherData } from "../vault/models/data/cipher.data";
|
||||
import { Cipher } from "../vault/models/domain/cipher";
|
||||
import { Folder } from "../vault/models/domain/folder";
|
||||
import { CipherView } from "../vault/models/view/cipher.view";
|
||||
import { FolderView } from "../vault/models/view/folder.view";
|
||||
|
||||
export class ExportService implements ExportServiceAbstraction {
|
||||
constructor(
|
||||
|
||||
@@ -4,8 +4,8 @@ import { LogService } from "../abstractions/log.service";
|
||||
import { FileUploadType } from "../enums/fileUploadType";
|
||||
import { EncArrayBuffer } from "../models/domain/enc-array-buffer";
|
||||
import { EncString } from "../models/domain/enc-string";
|
||||
import { AttachmentUploadDataResponse } from "../models/response/attachment-upload-data.response";
|
||||
import { SendFileUploadDataResponse } from "../models/response/send-file-upload-data.response";
|
||||
import { AttachmentUploadDataResponse } from "../vault/models/response/attachment-upload-data.response";
|
||||
|
||||
import { AzureFileUploadService } from "./azureFileUpload.service";
|
||||
import { BitwardenFileUploadService } from "./bitwardenFileUpload.service";
|
||||
|
||||
@@ -1,50 +0,0 @@
|
||||
import { ApiService } from "../../abstractions/api.service";
|
||||
import { FolderApiServiceAbstraction } from "../../abstractions/folder/folder-api.service.abstraction";
|
||||
import { InternalFolderService } from "../../abstractions/folder/folder.service.abstraction";
|
||||
import { FolderData } from "../../models/data/folder.data";
|
||||
import { Folder } from "../../models/domain/folder";
|
||||
import { FolderRequest } from "../../models/request/folder.request";
|
||||
import { FolderResponse } from "../../models/response/folder.response";
|
||||
|
||||
export class FolderApiService implements FolderApiServiceAbstraction {
|
||||
constructor(private folderService: InternalFolderService, private apiService: ApiService) {}
|
||||
|
||||
async save(folder: Folder): Promise<any> {
|
||||
const request = new FolderRequest(folder);
|
||||
|
||||
let response: FolderResponse;
|
||||
if (folder.id == null) {
|
||||
response = await this.postFolder(request);
|
||||
folder.id = response.id;
|
||||
} else {
|
||||
response = await this.putFolder(folder.id, request);
|
||||
}
|
||||
|
||||
const data = new FolderData(response);
|
||||
await this.folderService.upsert(data);
|
||||
}
|
||||
|
||||
async delete(id: string): Promise<any> {
|
||||
await this.deleteFolder(id);
|
||||
await this.folderService.delete(id);
|
||||
}
|
||||
|
||||
async get(id: string): Promise<FolderResponse> {
|
||||
const r = await this.apiService.send("GET", "/folders/" + id, null, true, true);
|
||||
return new FolderResponse(r);
|
||||
}
|
||||
|
||||
private async postFolder(request: FolderRequest): Promise<FolderResponse> {
|
||||
const r = await this.apiService.send("POST", "/folders", request, true, true);
|
||||
return new FolderResponse(r);
|
||||
}
|
||||
|
||||
async putFolder(id: string, request: FolderRequest): Promise<FolderResponse> {
|
||||
const r = await this.apiService.send("PUT", "/folders/" + id, request, true, true);
|
||||
return new FolderResponse(r);
|
||||
}
|
||||
|
||||
private deleteFolder(id: string): Promise<any> {
|
||||
return this.apiService.send("DELETE", "/folders/" + id, null, true, false);
|
||||
}
|
||||
}
|
||||
@@ -1,193 +0,0 @@
|
||||
import { BehaviorSubject, concatMap } from "rxjs";
|
||||
|
||||
import { CipherService } from "../../abstractions/cipher.service";
|
||||
import { CryptoService } from "../../abstractions/crypto.service";
|
||||
import { InternalFolderService as InternalFolderServiceAbstraction } from "../../abstractions/folder/folder.service.abstraction";
|
||||
import { I18nService } from "../../abstractions/i18n.service";
|
||||
import { StateService } from "../../abstractions/state.service";
|
||||
import { Utils } from "../../misc/utils";
|
||||
import { CipherData } from "../../models/data/cipher.data";
|
||||
import { FolderData } from "../../models/data/folder.data";
|
||||
import { Folder } from "../../models/domain/folder";
|
||||
import { SymmetricCryptoKey } from "../../models/domain/symmetric-crypto-key";
|
||||
import { FolderView } from "../../models/view/folder.view";
|
||||
|
||||
export class FolderService implements InternalFolderServiceAbstraction {
|
||||
protected _folders: BehaviorSubject<Folder[]> = new BehaviorSubject([]);
|
||||
protected _folderViews: BehaviorSubject<FolderView[]> = new BehaviorSubject([]);
|
||||
|
||||
folders$ = this._folders.asObservable();
|
||||
folderViews$ = this._folderViews.asObservable();
|
||||
|
||||
constructor(
|
||||
private cryptoService: CryptoService,
|
||||
private i18nService: I18nService,
|
||||
private cipherService: CipherService,
|
||||
private stateService: StateService
|
||||
) {
|
||||
this.stateService.activeAccountUnlocked$
|
||||
.pipe(
|
||||
concatMap(async (unlocked) => {
|
||||
if (Utils.global.bitwardenContainerService == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!unlocked) {
|
||||
this._folders.next([]);
|
||||
this._folderViews.next([]);
|
||||
return;
|
||||
}
|
||||
|
||||
const data = await this.stateService.getEncryptedFolders();
|
||||
|
||||
await this.updateObservables(data);
|
||||
})
|
||||
)
|
||||
.subscribe();
|
||||
}
|
||||
|
||||
async clearCache(): Promise<void> {
|
||||
this._folderViews.next([]);
|
||||
}
|
||||
|
||||
// TODO: This should be moved to EncryptService or something
|
||||
async encrypt(model: FolderView, key?: SymmetricCryptoKey): Promise<Folder> {
|
||||
const folder = new Folder();
|
||||
folder.id = model.id;
|
||||
folder.name = await this.cryptoService.encrypt(model.name, key);
|
||||
return folder;
|
||||
}
|
||||
|
||||
async get(id: string): Promise<Folder> {
|
||||
const folders = this._folders.getValue();
|
||||
|
||||
return folders.find((folder) => folder.id === id);
|
||||
}
|
||||
|
||||
async getAllFromState(): Promise<Folder[]> {
|
||||
const folders = await this.stateService.getEncryptedFolders();
|
||||
const response: Folder[] = [];
|
||||
for (const id in folders) {
|
||||
// eslint-disable-next-line
|
||||
if (folders.hasOwnProperty(id)) {
|
||||
response.push(new Folder(folders[id]));
|
||||
}
|
||||
}
|
||||
return response;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated For the CLI only
|
||||
* @param id id of the folder
|
||||
*/
|
||||
async getFromState(id: string): Promise<Folder> {
|
||||
const foldersMap = await this.stateService.getEncryptedFolders();
|
||||
const folder = foldersMap[id];
|
||||
if (folder == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return new Folder(folder);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Only use in CLI!
|
||||
*/
|
||||
async getAllDecryptedFromState(): Promise<FolderView[]> {
|
||||
const data = await this.stateService.getEncryptedFolders();
|
||||
const folders = Object.values(data || {}).map((f) => new Folder(f));
|
||||
|
||||
return this.decryptFolders(folders);
|
||||
}
|
||||
|
||||
async upsert(folder: FolderData | FolderData[]): Promise<void> {
|
||||
let folders = await this.stateService.getEncryptedFolders();
|
||||
if (folders == null) {
|
||||
folders = {};
|
||||
}
|
||||
|
||||
if (folder instanceof FolderData) {
|
||||
const f = folder as FolderData;
|
||||
folders[f.id] = f;
|
||||
} else {
|
||||
(folder as FolderData[]).forEach((f) => {
|
||||
folders[f.id] = f;
|
||||
});
|
||||
}
|
||||
|
||||
await this.updateObservables(folders);
|
||||
await this.stateService.setEncryptedFolders(folders);
|
||||
}
|
||||
|
||||
async replace(folders: { [id: string]: FolderData }): Promise<void> {
|
||||
await this.updateObservables(folders);
|
||||
await this.stateService.setEncryptedFolders(folders);
|
||||
}
|
||||
|
||||
async clear(userId?: string): Promise<any> {
|
||||
if (userId == null || userId == (await this.stateService.getUserId())) {
|
||||
this._folders.next([]);
|
||||
this._folderViews.next([]);
|
||||
}
|
||||
await this.stateService.setEncryptedFolders(null, { userId: userId });
|
||||
}
|
||||
|
||||
async delete(id: string | string[]): Promise<any> {
|
||||
const folders = await this.stateService.getEncryptedFolders();
|
||||
if (folders == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (typeof id === "string") {
|
||||
if (folders[id] == null) {
|
||||
return;
|
||||
}
|
||||
delete folders[id];
|
||||
} else {
|
||||
(id as string[]).forEach((i) => {
|
||||
delete folders[i];
|
||||
});
|
||||
}
|
||||
|
||||
await this.updateObservables(folders);
|
||||
await this.stateService.setEncryptedFolders(folders);
|
||||
|
||||
// Items in a deleted folder are re-assigned to "No Folder"
|
||||
const ciphers = await this.stateService.getEncryptedCiphers();
|
||||
if (ciphers != null) {
|
||||
const updates: CipherData[] = [];
|
||||
for (const cId in ciphers) {
|
||||
if (ciphers[cId].folderId === id) {
|
||||
ciphers[cId].folderId = null;
|
||||
updates.push(ciphers[cId]);
|
||||
}
|
||||
}
|
||||
if (updates.length > 0) {
|
||||
this.cipherService.upsert(updates);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private async updateObservables(foldersMap: { [id: string]: FolderData }) {
|
||||
const folders = Object.values(foldersMap || {}).map((f) => new Folder(f));
|
||||
|
||||
this._folders.next(folders);
|
||||
|
||||
if (await this.cryptoService.hasKey()) {
|
||||
this._folderViews.next(await this.decryptFolders(folders));
|
||||
}
|
||||
}
|
||||
|
||||
private async decryptFolders(folders: Folder[]) {
|
||||
const decryptFolderPromises = folders.map((f) => f.decrypt());
|
||||
const decryptedFolders = await Promise.all(decryptFolderPromises);
|
||||
|
||||
decryptedFolders.sort(Utils.getSortFunction(this.i18nService, "name"));
|
||||
|
||||
const noneFolder = new FolderView();
|
||||
noneFolder.name = this.i18nService.t("noneFolder");
|
||||
decryptedFolders.push(noneFolder);
|
||||
|
||||
return decryptedFolders;
|
||||
}
|
||||
}
|
||||
@@ -1,11 +1,8 @@
|
||||
import { CipherService } from "../../abstractions/cipher.service";
|
||||
import { CollectionService } from "../../abstractions/collection.service";
|
||||
import { CryptoService } from "../../abstractions/crypto.service";
|
||||
import { FolderService } from "../../abstractions/folder/folder.service.abstraction";
|
||||
import { I18nService } from "../../abstractions/i18n.service";
|
||||
import { ImportApiServiceAbstraction } from "../../abstractions/import/import-api.service.abstraction";
|
||||
import { ImportService as ImportServiceAbstraction } from "../../abstractions/import/import.service.abstraction";
|
||||
import { CipherType } from "../../enums/cipherType";
|
||||
import {
|
||||
featuredImportOptions,
|
||||
ImportOption,
|
||||
@@ -74,14 +71,17 @@ import { YotiCsvImporter } from "../../importers/yoti-csv-importer";
|
||||
import { ZohoVaultCsvImporter } from "../../importers/zohovault-csv-importer";
|
||||
import { Utils } from "../../misc/utils";
|
||||
import { ImportResult } from "../../models/domain/import-result";
|
||||
import { CipherRequest } from "../../models/request/cipher.request";
|
||||
import { CollectionRequest } from "../../models/request/collection.request";
|
||||
import { FolderRequest } from "../../models/request/folder.request";
|
||||
import { ImportCiphersRequest } from "../../models/request/import-ciphers.request";
|
||||
import { ImportOrganizationCiphersRequest } from "../../models/request/import-organization-ciphers.request";
|
||||
import { KvpRequest } from "../../models/request/kvp.request";
|
||||
import { ErrorResponse } from "../../models/response/error.response";
|
||||
import { CipherView } from "../../models/view/cipher.view";
|
||||
import { CipherService } from "../../vault/abstractions/cipher.service";
|
||||
import { FolderService } from "../../vault/abstractions/folder/folder.service.abstraction";
|
||||
import { CipherType } from "../../vault/enums/cipher-type";
|
||||
import { CipherRequest } from "../../vault/models/request/cipher.request";
|
||||
import { FolderRequest } from "../../vault/models/request/folder.request";
|
||||
import { CipherView } from "../../vault/models/view/cipher.view";
|
||||
|
||||
export class ImportService implements ImportServiceAbstraction {
|
||||
featuredImportOptions = featuredImportOptions as readonly ImportOption[];
|
||||
|
||||
@@ -8,7 +8,6 @@ import { EnvironmentService } from "../abstractions/environment.service";
|
||||
import { LogService } from "../abstractions/log.service";
|
||||
import { NotificationsService as NotificationsServiceAbstraction } from "../abstractions/notifications.service";
|
||||
import { StateService } from "../abstractions/state.service";
|
||||
import { SyncService } from "../abstractions/sync/sync.service.abstraction";
|
||||
import { AuthenticationStatus } from "../enums/authenticationStatus";
|
||||
import { NotificationType } from "../enums/notificationType";
|
||||
import {
|
||||
@@ -17,6 +16,7 @@ import {
|
||||
SyncFolderNotification,
|
||||
SyncSendNotification,
|
||||
} from "../models/response/notification.response";
|
||||
import { SyncService } from "../vault/abstractions/sync/sync.service.abstraction";
|
||||
|
||||
export class NotificationsService implements NotificationsServiceAbstraction {
|
||||
private signalrConnection: signalR.HubConnection;
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { ApiService } from "../../abstractions/api.service";
|
||||
import { OrganizationApiServiceAbstraction } from "../../abstractions/organization/organization-api.service.abstraction";
|
||||
import { SyncService } from "../../abstractions/sync/sync.service.abstraction";
|
||||
import { OrganizationApiKeyType } from "../../enums/organizationApiKeyType";
|
||||
import { ImportDirectoryRequest } from "../../models/request/import-directory.request";
|
||||
import { OrganizationApiKeyRequest } from "../../models/request/organization-api-key.request";
|
||||
@@ -27,6 +26,7 @@ import { OrganizationResponse } from "../../models/response/organization.respons
|
||||
import { OrganizationSsoResponse } from "../../models/response/organization/organization-sso.response";
|
||||
import { PaymentResponse } from "../../models/response/payment.response";
|
||||
import { TaxInfoResponse } from "../../models/response/tax-info.response";
|
||||
import { SyncService } from "../../vault/abstractions/sync/sync.service.abstraction";
|
||||
|
||||
export class OrganizationApiService implements OrganizationApiServiceAbstraction {
|
||||
constructor(private apiService: ApiService, private syncService: SyncService) {}
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
import * as lunr from "lunr";
|
||||
|
||||
import { CipherService } from "../abstractions/cipher.service";
|
||||
import { I18nService } from "../abstractions/i18n.service";
|
||||
import { LogService } from "../abstractions/log.service";
|
||||
import { SearchService as SearchServiceAbstraction } from "../abstractions/search.service";
|
||||
import { CipherType } from "../enums/cipherType";
|
||||
import { FieldType } from "../enums/fieldType";
|
||||
import { UriMatchType } from "../enums/uriMatchType";
|
||||
import { CipherView } from "../models/view/cipher.view";
|
||||
import { SendView } from "../models/view/send.view";
|
||||
import { CipherService } from "../vault/abstractions/cipher.service";
|
||||
import { CipherType } from "../vault/enums/cipher-type";
|
||||
import { CipherView } from "../vault/models/view/cipher.view";
|
||||
|
||||
export class SearchService implements SearchServiceAbstraction {
|
||||
private static registeredPipeline = false;
|
||||
|
||||
@@ -15,12 +15,9 @@ import { ThemeType } from "../enums/themeType";
|
||||
import { UriMatchType } from "../enums/uriMatchType";
|
||||
import { StateFactory } from "../factories/stateFactory";
|
||||
import { Utils } from "../misc/utils";
|
||||
import { CipherData } from "../models/data/cipher.data";
|
||||
import { CollectionData } from "../models/data/collection.data";
|
||||
import { EncryptedOrganizationKeyData } from "../models/data/encrypted-organization-key.data";
|
||||
import { EventData } from "../models/data/event.data";
|
||||
import { FolderData } from "../models/data/folder.data";
|
||||
import { LocalData } from "../models/data/local.data";
|
||||
import { OrganizationData } from "../models/data/organization.data";
|
||||
import { PolicyData } from "../models/data/policy.data";
|
||||
import { ProviderData } from "../models/data/provider.data";
|
||||
@@ -42,9 +39,12 @@ import { State } from "../models/domain/state";
|
||||
import { StorageOptions } from "../models/domain/storage-options";
|
||||
import { SymmetricCryptoKey } from "../models/domain/symmetric-crypto-key";
|
||||
import { WindowState } from "../models/domain/window-state";
|
||||
import { CipherView } from "../models/view/cipher.view";
|
||||
import { CollectionView } from "../models/view/collection.view";
|
||||
import { SendView } from "../models/view/send.view";
|
||||
import { CipherData } from "../vault/models/data/cipher.data";
|
||||
import { FolderData } from "../vault/models/data/folder.data";
|
||||
import { LocalData } from "../vault/models/data/local.data";
|
||||
import { CipherView } from "../vault/models/view/cipher.view";
|
||||
|
||||
const keys = {
|
||||
state: "state",
|
||||
|
||||
@@ -4,10 +4,8 @@ import { KdfType } from "../enums/kdfType";
|
||||
import { StateVersion } from "../enums/stateVersion";
|
||||
import { ThemeType } from "../enums/themeType";
|
||||
import { StateFactory } from "../factories/stateFactory";
|
||||
import { CipherData } from "../models/data/cipher.data";
|
||||
import { CollectionData } from "../models/data/collection.data";
|
||||
import { EventData } from "../models/data/event.data";
|
||||
import { FolderData } from "../models/data/folder.data";
|
||||
import { OrganizationData } from "../models/data/organization.data";
|
||||
import { PolicyData } from "../models/data/policy.data";
|
||||
import { ProviderData } from "../models/data/provider.data";
|
||||
@@ -23,6 +21,8 @@ import { EnvironmentUrls } from "../models/domain/environment-urls";
|
||||
import { GeneratedPasswordHistory } from "../models/domain/generated-password-history";
|
||||
import { GlobalState } from "../models/domain/global-state";
|
||||
import { StorageOptions } from "../models/domain/storage-options";
|
||||
import { CipherData } from "../vault/models/data/cipher.data";
|
||||
import { FolderData } from "../vault/models/data/folder.data";
|
||||
|
||||
import { TokenService } from "./token.service";
|
||||
|
||||
|
||||
@@ -1,401 +0,0 @@
|
||||
import { ApiService } from "../../abstractions/api.service";
|
||||
import { CipherService } from "../../abstractions/cipher.service";
|
||||
import { CollectionService } from "../../abstractions/collection.service";
|
||||
import { CryptoService } from "../../abstractions/crypto.service";
|
||||
import { FolderApiServiceAbstraction } from "../../abstractions/folder/folder-api.service.abstraction";
|
||||
import { InternalFolderService } from "../../abstractions/folder/folder.service.abstraction";
|
||||
import { KeyConnectorService } from "../../abstractions/keyConnector.service";
|
||||
import { LogService } from "../../abstractions/log.service";
|
||||
import { MessagingService } from "../../abstractions/messaging.service";
|
||||
import { InternalOrganizationService } from "../../abstractions/organization/organization.service.abstraction";
|
||||
import { InternalPolicyService } from "../../abstractions/policy/policy.service.abstraction";
|
||||
import { ProviderService } from "../../abstractions/provider.service";
|
||||
import { SendService } from "../../abstractions/send.service";
|
||||
import { SettingsService } from "../../abstractions/settings.service";
|
||||
import { StateService } from "../../abstractions/state.service";
|
||||
import { SyncService as SyncServiceAbstraction } from "../../abstractions/sync/sync.service.abstraction";
|
||||
import { sequentialize } from "../../misc/sequentialize";
|
||||
import { CipherData } from "../../models/data/cipher.data";
|
||||
import { CollectionData } from "../../models/data/collection.data";
|
||||
import { FolderData } from "../../models/data/folder.data";
|
||||
import { OrganizationData } from "../../models/data/organization.data";
|
||||
import { PolicyData } from "../../models/data/policy.data";
|
||||
import { ProviderData } from "../../models/data/provider.data";
|
||||
import { SendData } from "../../models/data/send.data";
|
||||
import { CipherResponse } from "../../models/response/cipher.response";
|
||||
import { CollectionDetailsResponse } from "../../models/response/collection.response";
|
||||
import { DomainsResponse } from "../../models/response/domains.response";
|
||||
import { FolderResponse } from "../../models/response/folder.response";
|
||||
import {
|
||||
SyncCipherNotification,
|
||||
SyncFolderNotification,
|
||||
SyncSendNotification,
|
||||
} from "../../models/response/notification.response";
|
||||
import { PolicyResponse } from "../../models/response/policy.response";
|
||||
import { ProfileResponse } from "../../models/response/profile.response";
|
||||
import { SendResponse } from "../../models/response/send.response";
|
||||
|
||||
export class SyncService implements SyncServiceAbstraction {
|
||||
syncInProgress = false;
|
||||
|
||||
constructor(
|
||||
private apiService: ApiService,
|
||||
private settingsService: SettingsService,
|
||||
private folderService: InternalFolderService,
|
||||
private cipherService: CipherService,
|
||||
private cryptoService: CryptoService,
|
||||
private collectionService: CollectionService,
|
||||
private messagingService: MessagingService,
|
||||
private policyService: InternalPolicyService,
|
||||
private sendService: SendService,
|
||||
private logService: LogService,
|
||||
private keyConnectorService: KeyConnectorService,
|
||||
private stateService: StateService,
|
||||
private providerService: ProviderService,
|
||||
private folderApiService: FolderApiServiceAbstraction,
|
||||
private organizationService: InternalOrganizationService,
|
||||
private logoutCallback: (expired: boolean) => Promise<void>
|
||||
) {}
|
||||
|
||||
async getLastSync(): Promise<Date> {
|
||||
if ((await this.stateService.getUserId()) == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const lastSync = await this.stateService.getLastSync();
|
||||
if (lastSync) {
|
||||
return new Date(lastSync);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
async setLastSync(date: Date, userId?: string): Promise<any> {
|
||||
await this.stateService.setLastSync(date.toJSON(), { userId: userId });
|
||||
}
|
||||
|
||||
@sequentialize(() => "fullSync")
|
||||
async fullSync(forceSync: boolean, allowThrowOnError = false): Promise<boolean> {
|
||||
this.syncStarted();
|
||||
const isAuthenticated = await this.stateService.getIsAuthenticated();
|
||||
if (!isAuthenticated) {
|
||||
return this.syncCompleted(false);
|
||||
}
|
||||
|
||||
const now = new Date();
|
||||
let needsSync = false;
|
||||
try {
|
||||
needsSync = await this.needsSyncing(forceSync);
|
||||
} catch (e) {
|
||||
if (allowThrowOnError) {
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
if (!needsSync) {
|
||||
await this.setLastSync(now);
|
||||
return this.syncCompleted(false);
|
||||
}
|
||||
|
||||
try {
|
||||
await this.apiService.refreshIdentityToken();
|
||||
const response = await this.apiService.getSync();
|
||||
|
||||
await this.syncProfile(response.profile);
|
||||
await this.syncFolders(response.folders);
|
||||
await this.syncCollections(response.collections);
|
||||
await this.syncCiphers(response.ciphers);
|
||||
await this.syncSends(response.sends);
|
||||
await this.syncSettings(response.domains);
|
||||
await this.syncPolicies(response.policies);
|
||||
|
||||
await this.setLastSync(now);
|
||||
return this.syncCompleted(true);
|
||||
} catch (e) {
|
||||
if (allowThrowOnError) {
|
||||
throw e;
|
||||
} else {
|
||||
return this.syncCompleted(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
async syncUpsertFolder(notification: SyncFolderNotification, isEdit: boolean): Promise<boolean> {
|
||||
this.syncStarted();
|
||||
if (await this.stateService.getIsAuthenticated()) {
|
||||
try {
|
||||
const localFolder = await this.folderService.get(notification.id);
|
||||
if (
|
||||
(!isEdit && localFolder == null) ||
|
||||
(isEdit && localFolder != null && localFolder.revisionDate < notification.revisionDate)
|
||||
) {
|
||||
const remoteFolder = await this.folderApiService.get(notification.id);
|
||||
if (remoteFolder != null) {
|
||||
await this.folderService.upsert(new FolderData(remoteFolder));
|
||||
this.messagingService.send("syncedUpsertedFolder", { folderId: notification.id });
|
||||
return this.syncCompleted(true);
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
this.logService.error(e);
|
||||
}
|
||||
}
|
||||
return this.syncCompleted(false);
|
||||
}
|
||||
|
||||
async syncDeleteFolder(notification: SyncFolderNotification): Promise<boolean> {
|
||||
this.syncStarted();
|
||||
if (await this.stateService.getIsAuthenticated()) {
|
||||
await this.folderService.delete(notification.id);
|
||||
this.messagingService.send("syncedDeletedFolder", { folderId: notification.id });
|
||||
this.syncCompleted(true);
|
||||
return true;
|
||||
}
|
||||
return this.syncCompleted(false);
|
||||
}
|
||||
|
||||
async syncUpsertCipher(notification: SyncCipherNotification, isEdit: boolean): Promise<boolean> {
|
||||
this.syncStarted();
|
||||
if (await this.stateService.getIsAuthenticated()) {
|
||||
try {
|
||||
let shouldUpdate = true;
|
||||
const localCipher = await this.cipherService.get(notification.id);
|
||||
if (localCipher != null && localCipher.revisionDate >= notification.revisionDate) {
|
||||
shouldUpdate = false;
|
||||
}
|
||||
|
||||
let checkCollections = false;
|
||||
if (shouldUpdate) {
|
||||
if (isEdit) {
|
||||
shouldUpdate = localCipher != null;
|
||||
checkCollections = true;
|
||||
} else {
|
||||
if (notification.collectionIds == null || notification.organizationId == null) {
|
||||
shouldUpdate = localCipher == null;
|
||||
} else {
|
||||
shouldUpdate = false;
|
||||
checkCollections = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (
|
||||
!shouldUpdate &&
|
||||
checkCollections &&
|
||||
notification.organizationId != null &&
|
||||
notification.collectionIds != null &&
|
||||
notification.collectionIds.length > 0
|
||||
) {
|
||||
const collections = await this.collectionService.getAll();
|
||||
if (collections != null) {
|
||||
for (let i = 0; i < collections.length; i++) {
|
||||
if (notification.collectionIds.indexOf(collections[i].id) > -1) {
|
||||
shouldUpdate = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (shouldUpdate) {
|
||||
const remoteCipher = await this.apiService.getFullCipherDetails(notification.id);
|
||||
if (remoteCipher != null) {
|
||||
await this.cipherService.upsert(new CipherData(remoteCipher));
|
||||
this.messagingService.send("syncedUpsertedCipher", { cipherId: notification.id });
|
||||
return this.syncCompleted(true);
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
if (e != null && e.statusCode === 404 && isEdit) {
|
||||
await this.cipherService.delete(notification.id);
|
||||
this.messagingService.send("syncedDeletedCipher", { cipherId: notification.id });
|
||||
return this.syncCompleted(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
return this.syncCompleted(false);
|
||||
}
|
||||
|
||||
async syncDeleteCipher(notification: SyncCipherNotification): Promise<boolean> {
|
||||
this.syncStarted();
|
||||
if (await this.stateService.getIsAuthenticated()) {
|
||||
await this.cipherService.delete(notification.id);
|
||||
this.messagingService.send("syncedDeletedCipher", { cipherId: notification.id });
|
||||
return this.syncCompleted(true);
|
||||
}
|
||||
return this.syncCompleted(false);
|
||||
}
|
||||
|
||||
async syncUpsertSend(notification: SyncSendNotification, isEdit: boolean): Promise<boolean> {
|
||||
this.syncStarted();
|
||||
if (await this.stateService.getIsAuthenticated()) {
|
||||
try {
|
||||
const localSend = await this.sendService.get(notification.id);
|
||||
if (
|
||||
(!isEdit && localSend == null) ||
|
||||
(isEdit && localSend != null && localSend.revisionDate < notification.revisionDate)
|
||||
) {
|
||||
const remoteSend = await this.apiService.getSend(notification.id);
|
||||
if (remoteSend != null) {
|
||||
await this.sendService.upsert(new SendData(remoteSend));
|
||||
this.messagingService.send("syncedUpsertedSend", { sendId: notification.id });
|
||||
return this.syncCompleted(true);
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
this.logService.error(e);
|
||||
}
|
||||
}
|
||||
return this.syncCompleted(false);
|
||||
}
|
||||
|
||||
async syncDeleteSend(notification: SyncSendNotification): Promise<boolean> {
|
||||
this.syncStarted();
|
||||
if (await this.stateService.getIsAuthenticated()) {
|
||||
await this.sendService.delete(notification.id);
|
||||
this.messagingService.send("syncedDeletedSend", { sendId: notification.id });
|
||||
this.syncCompleted(true);
|
||||
return true;
|
||||
}
|
||||
return this.syncCompleted(false);
|
||||
}
|
||||
|
||||
// Helpers
|
||||
|
||||
private syncStarted() {
|
||||
this.syncInProgress = true;
|
||||
this.messagingService.send("syncStarted");
|
||||
}
|
||||
|
||||
private syncCompleted(successfully: boolean): boolean {
|
||||
this.syncInProgress = false;
|
||||
this.messagingService.send("syncCompleted", { successfully: successfully });
|
||||
return successfully;
|
||||
}
|
||||
|
||||
private async needsSyncing(forceSync: boolean) {
|
||||
if (forceSync) {
|
||||
return true;
|
||||
}
|
||||
|
||||
const lastSync = await this.getLastSync();
|
||||
if (lastSync == null || lastSync.getTime() === 0) {
|
||||
return true;
|
||||
}
|
||||
|
||||
const response = await this.apiService.getAccountRevisionDate();
|
||||
if (new Date(response) <= lastSync) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
private async syncProfile(response: ProfileResponse) {
|
||||
const stamp = await this.stateService.getSecurityStamp();
|
||||
if (stamp != null && stamp !== response.securityStamp) {
|
||||
if (this.logoutCallback != null) {
|
||||
await this.logoutCallback(true);
|
||||
}
|
||||
|
||||
throw new Error("Stamp has changed");
|
||||
}
|
||||
|
||||
await this.cryptoService.setEncKey(response.key);
|
||||
await this.cryptoService.setEncPrivateKey(response.privateKey);
|
||||
await this.cryptoService.setProviderKeys(response.providers);
|
||||
await this.cryptoService.setOrgKeys(response.organizations, response.providerOrganizations);
|
||||
await this.stateService.setAvatarColor(response.avatarColor);
|
||||
await this.stateService.setSecurityStamp(response.securityStamp);
|
||||
await this.stateService.setEmailVerified(response.emailVerified);
|
||||
await this.stateService.setHasPremiumPersonally(response.premiumPersonally);
|
||||
await this.stateService.setHasPremiumFromOrganization(response.premiumFromOrganization);
|
||||
await this.stateService.setForcePasswordReset(response.forcePasswordReset);
|
||||
await this.keyConnectorService.setUsesKeyConnector(response.usesKeyConnector);
|
||||
|
||||
const organizations: { [id: string]: OrganizationData } = {};
|
||||
response.organizations.forEach((o) => {
|
||||
organizations[o.id] = new OrganizationData(o);
|
||||
});
|
||||
|
||||
const providers: { [id: string]: ProviderData } = {};
|
||||
response.providers.forEach((p) => {
|
||||
providers[p.id] = new ProviderData(p);
|
||||
});
|
||||
|
||||
response.providerOrganizations.forEach((o) => {
|
||||
if (organizations[o.id] == null) {
|
||||
organizations[o.id] = new OrganizationData(o);
|
||||
organizations[o.id].isProviderUser = true;
|
||||
}
|
||||
});
|
||||
|
||||
await this.organizationService.replace(organizations);
|
||||
await this.providerService.save(providers);
|
||||
|
||||
if (await this.keyConnectorService.userNeedsMigration()) {
|
||||
await this.keyConnectorService.setConvertAccountRequired(true);
|
||||
this.messagingService.send("convertAccountToKeyConnector");
|
||||
} else {
|
||||
this.keyConnectorService.removeConvertAccountRequired();
|
||||
}
|
||||
}
|
||||
|
||||
private async syncFolders(response: FolderResponse[]) {
|
||||
const folders: { [id: string]: FolderData } = {};
|
||||
response.forEach((f) => {
|
||||
folders[f.id] = new FolderData(f);
|
||||
});
|
||||
return await this.folderService.replace(folders);
|
||||
}
|
||||
|
||||
private async syncCollections(response: CollectionDetailsResponse[]) {
|
||||
const collections: { [id: string]: CollectionData } = {};
|
||||
response.forEach((c) => {
|
||||
collections[c.id] = new CollectionData(c);
|
||||
});
|
||||
return await this.collectionService.replace(collections);
|
||||
}
|
||||
|
||||
private async syncCiphers(response: CipherResponse[]) {
|
||||
const ciphers: { [id: string]: CipherData } = {};
|
||||
response.forEach((c) => {
|
||||
ciphers[c.id] = new CipherData(c);
|
||||
});
|
||||
return await this.cipherService.replace(ciphers);
|
||||
}
|
||||
|
||||
private async syncSends(response: SendResponse[]) {
|
||||
const sends: { [id: string]: SendData } = {};
|
||||
response.forEach((s) => {
|
||||
sends[s.id] = new SendData(s);
|
||||
});
|
||||
return await this.sendService.replace(sends);
|
||||
}
|
||||
|
||||
private async syncSettings(response: DomainsResponse) {
|
||||
let eqDomains: string[][] = [];
|
||||
if (response != null && response.equivalentDomains != null) {
|
||||
eqDomains = eqDomains.concat(response.equivalentDomains);
|
||||
}
|
||||
|
||||
if (response != null && response.globalEquivalentDomains != null) {
|
||||
response.globalEquivalentDomains.forEach((global) => {
|
||||
if (global.domains.length > 0) {
|
||||
eqDomains.push(global.domains);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
return this.settingsService.setEquivalentDomains(eqDomains);
|
||||
}
|
||||
|
||||
private async syncPolicies(response: PolicyResponse[]) {
|
||||
const policies: { [id: string]: PolicyData } = {};
|
||||
if (response != null) {
|
||||
response.forEach((p) => {
|
||||
policies[p.id] = new PolicyData(p);
|
||||
});
|
||||
}
|
||||
return await this.policyService.replace(policies);
|
||||
}
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
import { Subject } from "rxjs";
|
||||
|
||||
import { SyncNotifierService as SyncNotifierServiceAbstraction } from "../../abstractions/sync/syncNotifier.service.abstraction";
|
||||
import { SyncEventArgs } from "../../types/syncEventArgs";
|
||||
|
||||
/**
|
||||
* This class should most likely have 0 dependencies because it will hopefully
|
||||
* be rolled into SyncService once upon a time.
|
||||
*/
|
||||
export class SyncNotifierService implements SyncNotifierServiceAbstraction {
|
||||
private _sync = new Subject<SyncEventArgs>();
|
||||
|
||||
sync$ = this._sync.asObservable();
|
||||
|
||||
next(event: SyncEventArgs): void {
|
||||
this._sync.next(event);
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1,8 @@
|
||||
import { firstValueFrom } from "rxjs";
|
||||
|
||||
import { AuthService } from "../../abstractions/auth.service";
|
||||
import { CipherService } from "../../abstractions/cipher.service";
|
||||
import { CollectionService } from "../../abstractions/collection.service";
|
||||
import { CryptoService } from "../../abstractions/crypto.service";
|
||||
import { FolderService } from "../../abstractions/folder/folder.service.abstraction";
|
||||
import { KeyConnectorService } from "../../abstractions/keyConnector.service";
|
||||
import { MessagingService } from "../../abstractions/messaging.service";
|
||||
import { PlatformUtilsService } from "../../abstractions/platformUtils.service";
|
||||
@@ -13,6 +11,8 @@ import { StateService } from "../../abstractions/state.service";
|
||||
import { VaultTimeoutService as VaultTimeoutServiceAbstraction } from "../../abstractions/vaultTimeout/vaultTimeout.service";
|
||||
import { VaultTimeoutSettingsService } from "../../abstractions/vaultTimeout/vaultTimeoutSettings.service";
|
||||
import { AuthenticationStatus } from "../../enums/authenticationStatus";
|
||||
import { CipherService } from "../../vault/abstractions/cipher.service";
|
||||
import { FolderService } from "../../vault/abstractions/folder/folder.service.abstraction";
|
||||
|
||||
export class VaultTimeoutService implements VaultTimeoutServiceAbstraction {
|
||||
private inited = false;
|
||||
|
||||
Reference in New Issue
Block a user