mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-15 10:35:20 +01:00
cleanup and removed unused references
This commit is contained in:
parent
9fec4edf97
commit
2bb4d52822
@ -530,13 +530,11 @@ export default class MainBackground {
|
||||
this.popupUtilsService = new PopupUtilsService(this.isPrivateMode);
|
||||
this.fido2UserInterfaceService = new BrowserFido2UserInterfaceService(
|
||||
this.popupUtilsService,
|
||||
this.authService,
|
||||
this.syncService
|
||||
this.authService
|
||||
);
|
||||
this.fido2AuthenticatorService = new Fido2AuthenticatorService(
|
||||
this.cipherService,
|
||||
this.fido2UserInterfaceService,
|
||||
this.authService,
|
||||
this.logService
|
||||
);
|
||||
this.fido2ClientService = new Fido2ClientService(
|
||||
|
@ -24,7 +24,6 @@ import {
|
||||
NewCredentialParams,
|
||||
PickCredentialParams,
|
||||
} 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 { Popout, PopupUtilsService } from "../../popup/services/popup-utils.service";
|
||||
@ -112,11 +111,7 @@ export type BrowserFido2Message = { sessionId: string } & (
|
||||
);
|
||||
|
||||
export class BrowserFido2UserInterfaceService implements Fido2UserInterfaceServiceAbstraction {
|
||||
constructor(
|
||||
private popupUtilsService: PopupUtilsService,
|
||||
private authService: AuthService,
|
||||
private syncService: SyncService
|
||||
) {}
|
||||
constructor(private popupUtilsService: PopupUtilsService, private authService: AuthService) {}
|
||||
|
||||
async newSession(
|
||||
fallbackSupported: boolean,
|
||||
@ -125,7 +120,6 @@ export class BrowserFido2UserInterfaceService implements Fido2UserInterfaceServi
|
||||
return await BrowserFido2UserInterfaceSession.create(
|
||||
this.popupUtilsService,
|
||||
this.authService,
|
||||
this.syncService,
|
||||
fallbackSupported,
|
||||
abortController
|
||||
);
|
||||
@ -136,14 +130,12 @@ export class BrowserFido2UserInterfaceSession implements Fido2UserInterfaceSessi
|
||||
static async create(
|
||||
popupUtilsService: PopupUtilsService,
|
||||
authService: AuthService,
|
||||
syncService: SyncService,
|
||||
fallbackSupported: boolean,
|
||||
abortController?: AbortController
|
||||
): Promise<BrowserFido2UserInterfaceSession> {
|
||||
return new BrowserFido2UserInterfaceSession(
|
||||
popupUtilsService,
|
||||
authService,
|
||||
syncService,
|
||||
fallbackSupported,
|
||||
abortController
|
||||
);
|
||||
@ -166,7 +158,6 @@ export class BrowserFido2UserInterfaceSession implements Fido2UserInterfaceSessi
|
||||
private constructor(
|
||||
private readonly popupUtilsService: PopupUtilsService,
|
||||
private readonly authService: AuthService,
|
||||
private readonly syncService: SyncService,
|
||||
private readonly fallbackSupported: boolean,
|
||||
readonly abortController = new AbortController(),
|
||||
readonly sessionId = Utils.newGuid()
|
||||
@ -300,11 +291,6 @@ export class BrowserFido2UserInterfaceSession implements Fido2UserInterfaceSessi
|
||||
|
||||
async ensureUnlockedVault(): Promise<void> {
|
||||
await this.connect();
|
||||
// await this.syncService.fullSync(false);
|
||||
}
|
||||
|
||||
async fullSync(): Promise<void> {
|
||||
await this.syncService.fullSync(false);
|
||||
}
|
||||
|
||||
async informCredentialNotFound(): Promise<void> {
|
||||
|
@ -33,7 +33,6 @@ export abstract class Fido2UserInterfaceSession {
|
||||
abortController?: AbortController
|
||||
) => Promise<{ cipherId: string; userVerified: boolean }>;
|
||||
ensureUnlockedVault: () => Promise<void>;
|
||||
fullSync: () => Promise<void>;
|
||||
informExcludedCredential: (
|
||||
existingCipherIds: string[],
|
||||
abortController?: AbortController
|
||||
|
@ -1,6 +1,5 @@
|
||||
import { CBOR } from "cbor-redux";
|
||||
|
||||
import { AuthService } from "../../../auth/abstractions/auth.service";
|
||||
import { LogService } from "../../../platform/abstractions/log.service";
|
||||
import { Utils } from "../../../platform/misc/utils";
|
||||
import { CipherService } from "../../abstractions/cipher.service";
|
||||
@ -38,7 +37,6 @@ export class Fido2AuthenticatorService implements Fido2AuthenticatorServiceAbstr
|
||||
constructor(
|
||||
private cipherService: CipherService,
|
||||
private userInterface: Fido2UserInterfaceService,
|
||||
private authService: AuthService,
|
||||
private logService?: LogService
|
||||
) {}
|
||||
async makeCredential(
|
||||
@ -235,8 +233,8 @@ export class Fido2AuthenticatorService implements Fido2AuthenticatorServiceAbstr
|
||||
|
||||
let cipherOptions: CipherView[];
|
||||
|
||||
//TODO: add here
|
||||
await userInterfaceSession.ensureUnlockedVault();
|
||||
//TODO: uncomment this when working on the login flow ticket
|
||||
// await userInterfaceSession.ensureUnlockedVault();
|
||||
|
||||
// eslint-disable-next-line no-empty
|
||||
if (params.allowCredentialDescriptorList?.length > 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user