mirror of
https://github.com/bitwarden/browser
synced 2026-02-14 15:33:55 +00:00
feat(two-factor-api-service) [PM-26465]: (Refactor) Two-Factor API Service (#16747)
* feat(two-factor-api-service) [PM-26465]: Add TwoFactorApiServiceAbstraction. * feat(two-factor-api-service) [PM-26465]: Add TwoFactorApiService implementation. * feat(two-factor-api-service) [PM-26465]: Add test suite for TwoFactorApiService. * feat(two-factor-api-service) [PM-26465]: Replace ApiService dependencies with TwoFactorApiService for all refactored methods. * feat(two-factor-api-service) [PM-26465]: Finish removal of Two-Factor API methods from ApiService. * fix(two-factor-api-service) [PM-26465]: Correct endpoint spelling. * feat(two-factor-api-service) [PM-26465]: Update dependency support for CLI. * fix(two-factor-api-service) [PM-26465]: Update tests/deps for corrected spelling. * feat(two-factor-api-service) [PM-26465]: Add TwoFactorApiService to Browser services module. * fix(two-factor-api-service) [PM-26465]: Re-spell dependencies to take *Abstraction throughout, move to JslibServices module for cleaner importing across clients. * feat(two-factor-api-service) [PM-26465]: Move new services to a feature area, rename abstract and concrete/default. * feat(two-factor-api-service) [PM-26465]: Move the feature area to common/auth, not auth/common. * feat(two-factor-api-service) [PM-26465]: Remove now-unneeded include from auth/tsconfig.
This commit is contained in:
@@ -5,7 +5,6 @@ import { ActivatedRoute } from "@angular/router";
|
||||
import { concatMap, takeUntil, map, lastValueFrom, firstValueFrom } from "rxjs";
|
||||
import { first, tap } from "rxjs/operators";
|
||||
|
||||
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
||||
import {
|
||||
getOrganizationById,
|
||||
OrganizationService,
|
||||
@@ -15,6 +14,7 @@ import { AccountService } from "@bitwarden/common/auth/abstractions/account.serv
|
||||
import { TwoFactorProviderType } from "@bitwarden/common/auth/enums/two-factor-provider-type";
|
||||
import { TwoFactorDuoResponse } from "@bitwarden/common/auth/models/response/two-factor-duo.response";
|
||||
import { getUserId } from "@bitwarden/common/auth/services/account.service";
|
||||
import { TwoFactorApiService } from "@bitwarden/common/auth/two-factor";
|
||||
import { AuthResponse } from "@bitwarden/common/auth/types/auth-response";
|
||||
import { BillingAccountProfileStateService } from "@bitwarden/common/billing/abstractions/account/billing-account-profile-state.service";
|
||||
import { ConfigService } from "@bitwarden/common/platform/abstractions/config/config.service";
|
||||
@@ -35,7 +35,7 @@ export class TwoFactorSetupComponent extends BaseTwoFactorSetupComponent impleme
|
||||
tabbedHeader = false;
|
||||
constructor(
|
||||
dialogService: DialogService,
|
||||
apiService: ApiService,
|
||||
twoFactorApiService: TwoFactorApiService,
|
||||
messagingService: MessagingService,
|
||||
policyService: PolicyService,
|
||||
private route: ActivatedRoute,
|
||||
@@ -47,7 +47,7 @@ export class TwoFactorSetupComponent extends BaseTwoFactorSetupComponent impleme
|
||||
) {
|
||||
super(
|
||||
dialogService,
|
||||
apiService,
|
||||
twoFactorApiService,
|
||||
messagingService,
|
||||
policyService,
|
||||
billingAccountProfileStateService,
|
||||
@@ -116,7 +116,7 @@ export class TwoFactorSetupComponent extends BaseTwoFactorSetupComponent impleme
|
||||
}
|
||||
|
||||
protected getTwoFactorProviders() {
|
||||
return this.apiService.getTwoFactorOrganizationProviders(this.organizationId);
|
||||
return this.twoFactorApiService.getTwoFactorOrganizationProviders(this.organizationId);
|
||||
}
|
||||
|
||||
protected filterProvider(type: TwoFactorProviderType): boolean {
|
||||
|
||||
Reference in New Issue
Block a user