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

cleanup and removed unused references

This commit is contained in:
gbubemismith
2023-08-08 10:43:00 -04:00
parent 9fec4edf97
commit 2bb4d52822
4 changed files with 4 additions and 23 deletions

View File

@@ -530,13 +530,11 @@ export default class MainBackground {
this.popupUtilsService = new PopupUtilsService(this.isPrivateMode); this.popupUtilsService = new PopupUtilsService(this.isPrivateMode);
this.fido2UserInterfaceService = new BrowserFido2UserInterfaceService( this.fido2UserInterfaceService = new BrowserFido2UserInterfaceService(
this.popupUtilsService, this.popupUtilsService,
this.authService, this.authService
this.syncService
); );
this.fido2AuthenticatorService = new Fido2AuthenticatorService( this.fido2AuthenticatorService = new Fido2AuthenticatorService(
this.cipherService, this.cipherService,
this.fido2UserInterfaceService, this.fido2UserInterfaceService,
this.authService,
this.logService this.logService
); );
this.fido2ClientService = new Fido2ClientService( this.fido2ClientService = new Fido2ClientService(

View File

@@ -24,7 +24,6 @@ import {
NewCredentialParams, NewCredentialParams,
PickCredentialParams, PickCredentialParams,
} from "@bitwarden/common/vault/abstractions/fido2/fido2-user-interface.service.abstraction"; } from "@bitwarden/common/vault/abstractions/fido2/fido2-user-interface.service.abstraction";
import { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.service.abstraction";
import { BrowserApi } from "../../platform/browser/browser-api"; import { BrowserApi } from "../../platform/browser/browser-api";
import { Popout, PopupUtilsService } from "../../popup/services/popup-utils.service"; import { Popout, PopupUtilsService } from "../../popup/services/popup-utils.service";
@@ -112,11 +111,7 @@ export type BrowserFido2Message = { sessionId: string } & (
); );
export class BrowserFido2UserInterfaceService implements Fido2UserInterfaceServiceAbstraction { export class BrowserFido2UserInterfaceService implements Fido2UserInterfaceServiceAbstraction {
constructor( constructor(private popupUtilsService: PopupUtilsService, private authService: AuthService) {}
private popupUtilsService: PopupUtilsService,
private authService: AuthService,
private syncService: SyncService
) {}
async newSession( async newSession(
fallbackSupported: boolean, fallbackSupported: boolean,
@@ -125,7 +120,6 @@ export class BrowserFido2UserInterfaceService implements Fido2UserInterfaceServi
return await BrowserFido2UserInterfaceSession.create( return await BrowserFido2UserInterfaceSession.create(
this.popupUtilsService, this.popupUtilsService,
this.authService, this.authService,
this.syncService,
fallbackSupported, fallbackSupported,
abortController abortController
); );
@@ -136,14 +130,12 @@ export class BrowserFido2UserInterfaceSession implements Fido2UserInterfaceSessi
static async create( static async create(
popupUtilsService: PopupUtilsService, popupUtilsService: PopupUtilsService,
authService: AuthService, authService: AuthService,
syncService: SyncService,
fallbackSupported: boolean, fallbackSupported: boolean,
abortController?: AbortController abortController?: AbortController
): Promise<BrowserFido2UserInterfaceSession> { ): Promise<BrowserFido2UserInterfaceSession> {
return new BrowserFido2UserInterfaceSession( return new BrowserFido2UserInterfaceSession(
popupUtilsService, popupUtilsService,
authService, authService,
syncService,
fallbackSupported, fallbackSupported,
abortController abortController
); );
@@ -166,7 +158,6 @@ export class BrowserFido2UserInterfaceSession implements Fido2UserInterfaceSessi
private constructor( private constructor(
private readonly popupUtilsService: PopupUtilsService, private readonly popupUtilsService: PopupUtilsService,
private readonly authService: AuthService, private readonly authService: AuthService,
private readonly syncService: SyncService,
private readonly fallbackSupported: boolean, private readonly fallbackSupported: boolean,
readonly abortController = new AbortController(), readonly abortController = new AbortController(),
readonly sessionId = Utils.newGuid() readonly sessionId = Utils.newGuid()
@@ -300,11 +291,6 @@ export class BrowserFido2UserInterfaceSession implements Fido2UserInterfaceSessi
async ensureUnlockedVault(): Promise<void> { async ensureUnlockedVault(): Promise<void> {
await this.connect(); await this.connect();
// await this.syncService.fullSync(false);
}
async fullSync(): Promise<void> {
await this.syncService.fullSync(false);
} }
async informCredentialNotFound(): Promise<void> { async informCredentialNotFound(): Promise<void> {

View File

@@ -33,7 +33,6 @@ export abstract class Fido2UserInterfaceSession {
abortController?: AbortController abortController?: AbortController
) => Promise<{ cipherId: string; userVerified: boolean }>; ) => Promise<{ cipherId: string; userVerified: boolean }>;
ensureUnlockedVault: () => Promise<void>; ensureUnlockedVault: () => Promise<void>;
fullSync: () => Promise<void>;
informExcludedCredential: ( informExcludedCredential: (
existingCipherIds: string[], existingCipherIds: string[],
abortController?: AbortController abortController?: AbortController

View File

@@ -1,6 +1,5 @@
import { CBOR } from "cbor-redux"; import { CBOR } from "cbor-redux";
import { AuthService } from "../../../auth/abstractions/auth.service";
import { LogService } from "../../../platform/abstractions/log.service"; import { LogService } from "../../../platform/abstractions/log.service";
import { Utils } from "../../../platform/misc/utils"; import { Utils } from "../../../platform/misc/utils";
import { CipherService } from "../../abstractions/cipher.service"; import { CipherService } from "../../abstractions/cipher.service";
@@ -38,7 +37,6 @@ export class Fido2AuthenticatorService implements Fido2AuthenticatorServiceAbstr
constructor( constructor(
private cipherService: CipherService, private cipherService: CipherService,
private userInterface: Fido2UserInterfaceService, private userInterface: Fido2UserInterfaceService,
private authService: AuthService,
private logService?: LogService private logService?: LogService
) {} ) {}
async makeCredential( async makeCredential(
@@ -235,8 +233,8 @@ export class Fido2AuthenticatorService implements Fido2AuthenticatorServiceAbstr
let cipherOptions: CipherView[]; let cipherOptions: CipherView[];
//TODO: add here //TODO: uncomment this when working on the login flow ticket
await userInterfaceSession.ensureUnlockedVault(); // await userInterfaceSession.ensureUnlockedVault();
// eslint-disable-next-line no-empty // eslint-disable-next-line no-empty
if (params.allowCredentialDescriptorList?.length > 0) { if (params.allowCredentialDescriptorList?.length > 0) {