1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-07 12:13:45 +00:00

PM-20532 - Register SendTokenService and SendTokenApiService

This commit is contained in:
Jared Snider
2025-05-29 13:25:04 -04:00
parent 3c6f3aabdc
commit 24165fef8e
2 changed files with 16 additions and 1 deletions

View File

@@ -108,6 +108,10 @@ import { UserVerificationService as UserVerificationServiceAbstraction } from "@
import { WebAuthnLoginApiServiceAbstraction } from "@bitwarden/common/auth/abstractions/webauthn/webauthn-login-api.service.abstraction";
import { WebAuthnLoginPrfKeyServiceAbstraction } from "@bitwarden/common/auth/abstractions/webauthn/webauthn-login-prf-key.service.abstraction";
import { WebAuthnLoginServiceAbstraction } from "@bitwarden/common/auth/abstractions/webauthn/webauthn-login.service.abstraction";
import { SendTokenApiService as SendTokenApiServiceAbstraction } from "@bitwarden/common/auth/send-access/abstractions/send-token-api.service";
import { SendTokenService as SendTokenServiceAbstraction } from "@bitwarden/common/auth/send-access/abstractions/send-token.service";
import { SendTokenApiService } from "@bitwarden/common/auth/send-access/services/send-token-api.service";
import { SendTokenService } from "@bitwarden/common/auth/send-access/services/send-token.service";
import { AccountApiServiceImplementation } from "@bitwarden/common/auth/services/account-api.service";
import { AccountServiceImplementation } from "@bitwarden/common/auth/services/account.service";
import { AnonymousHubService } from "@bitwarden/common/auth/services/anonymous-hub.service";
@@ -1439,6 +1443,16 @@ const safeProviders: SafeProvider[] = [
useClass: SendPasswordService,
deps: [CryptoFunctionServiceAbstraction],
}),
safeProvider({
provide: SendTokenApiServiceAbstraction,
useClass: SendTokenApiService,
deps: [EnvironmentService, ApiServiceAbstraction],
}),
safeProvider({
provide: SendTokenServiceAbstraction,
useClass: SendTokenService,
deps: [GlobalStateProvider, SendTokenApiServiceAbstraction, SendPasswordService],
}),
safeProvider({
provide: LoginComponentService,
useClass: DefaultLoginComponentService,

View File

@@ -12,13 +12,14 @@ import {
SEND_ACCESS_DISK,
} from "../../../platform/state";
import { SendAccessTokenRequest } from "../../models/request/identity-token/send-access-token.request";
import { SendTokenApiService } from "../abstractions/send-token-api.service";
import {
SendAccessCredentials,
SendTokenService as SendTokenServiceAbstraction,
} from "../abstractions/send-token.service";
import { SendAccessToken } from "../models/send-access-token";
import { SendTokenApiRetrievalError, SendTokenApiService } from "./send-token-api.service";
import { SendTokenApiRetrievalError } from "./send-token-api.service";
// TODO: add JSDocs
// TODO: add tests for this service.