|
|
|
|
@@ -8,12 +8,12 @@ import { LogoutUseCase } from '@core/identity/application/use-cases/LogoutUseCas
|
|
|
|
|
import { ResetPasswordUseCase } from '@core/identity/application/use-cases/ResetPasswordUseCase';
|
|
|
|
|
import { SignupSponsorUseCase } from '@core/identity/application/use-cases/SignupSponsorUseCase';
|
|
|
|
|
import { SignupUseCase } from '@core/identity/application/use-cases/SignupUseCase';
|
|
|
|
|
import type { IMagicLinkNotificationPort } from '@core/identity/domain/ports/MagicLinkNotificationPort';
|
|
|
|
|
import type { IAuthRepository } from '@core/identity/domain/repositories/AuthRepository';
|
|
|
|
|
import type { ICompanyRepository } from '@core/identity/domain/repositories/CompanyRepository';
|
|
|
|
|
import type { IMagicLinkRepository } from '@core/identity/domain/repositories/MagicLinkRepository';
|
|
|
|
|
import type { IPasswordHashingService } from '@core/identity/domain/services/PasswordHashingService';
|
|
|
|
|
import type { Logger } from '@core/shared/domain/Logger';
|
|
|
|
|
import type { MagicLinkNotificationPort } from '@core/identity/domain/ports/MagicLinkNotificationPort';
|
|
|
|
|
import type { AuthRepository } from '@core/identity/domain/repositories/AuthRepository';
|
|
|
|
|
import type { CompanyRepository } from '@core/identity/domain/repositories/CompanyRepository';
|
|
|
|
|
import type { MagicLinkRepository } from '@core/identity/domain/repositories/MagicLinkRepository';
|
|
|
|
|
import type { PasswordHashingService } from '@core/identity/domain/services/PasswordHashingService';
|
|
|
|
|
import type { Logger } from '@core/shared/application/UseCaseOutputPort/UseCaseOutputPort/UseCaseOutputPort_TEMP_TEMP';
|
|
|
|
|
|
|
|
|
|
import {
|
|
|
|
|
AUTH_REPOSITORY_TOKEN,
|
|
|
|
|
@@ -66,8 +66,8 @@ export const AuthProviders: Provider[] = [
|
|
|
|
|
{
|
|
|
|
|
provide: LOGIN_USE_CASE_TOKEN,
|
|
|
|
|
useFactory: (
|
|
|
|
|
authRepo: IAuthRepository,
|
|
|
|
|
passwordHashing: IPasswordHashingService,
|
|
|
|
|
authRepo: AuthRepository,
|
|
|
|
|
passwordHashing: PasswordHashingService,
|
|
|
|
|
logger: Logger,
|
|
|
|
|
) => new LoginUseCase(authRepo, passwordHashing, logger),
|
|
|
|
|
inject: [AUTH_REPOSITORY_TOKEN, PASSWORD_HASHING_SERVICE_TOKEN, LOGGER_TOKEN],
|
|
|
|
|
@@ -75,8 +75,8 @@ export const AuthProviders: Provider[] = [
|
|
|
|
|
{
|
|
|
|
|
provide: SIGNUP_USE_CASE_TOKEN,
|
|
|
|
|
useFactory: (
|
|
|
|
|
authRepo: IAuthRepository,
|
|
|
|
|
passwordHashing: IPasswordHashingService,
|
|
|
|
|
authRepo: AuthRepository,
|
|
|
|
|
passwordHashing: PasswordHashingService,
|
|
|
|
|
logger: Logger,
|
|
|
|
|
) => new SignupUseCase(authRepo, passwordHashing, logger),
|
|
|
|
|
inject: [AUTH_REPOSITORY_TOKEN, PASSWORD_HASHING_SERVICE_TOKEN, LOGGER_TOKEN],
|
|
|
|
|
@@ -84,9 +84,9 @@ export const AuthProviders: Provider[] = [
|
|
|
|
|
{
|
|
|
|
|
provide: SIGNUP_SPONSOR_USE_CASE_TOKEN,
|
|
|
|
|
useFactory: (
|
|
|
|
|
authRepo: IAuthRepository,
|
|
|
|
|
companyRepo: ICompanyRepository,
|
|
|
|
|
passwordHashing: IPasswordHashingService,
|
|
|
|
|
authRepo: AuthRepository,
|
|
|
|
|
companyRepo: CompanyRepository,
|
|
|
|
|
passwordHashing: PasswordHashingService,
|
|
|
|
|
logger: Logger,
|
|
|
|
|
) => new SignupSponsorUseCase(authRepo, companyRepo, passwordHashing, logger),
|
|
|
|
|
inject: [AUTH_REPOSITORY_TOKEN, COMPANY_REPOSITORY_TOKEN, PASSWORD_HASHING_SERVICE_TOKEN, LOGGER_TOKEN],
|
|
|
|
|
@@ -119,9 +119,9 @@ export const AuthProviders: Provider[] = [
|
|
|
|
|
{
|
|
|
|
|
provide: FORGOT_PASSWORD_USE_CASE_TOKEN,
|
|
|
|
|
useFactory: (
|
|
|
|
|
authRepo: IAuthRepository,
|
|
|
|
|
magicLinkRepo: IMagicLinkRepository,
|
|
|
|
|
notificationPort: IMagicLinkNotificationPort,
|
|
|
|
|
authRepo: AuthRepository,
|
|
|
|
|
magicLinkRepo: MagicLinkRepository,
|
|
|
|
|
notificationPort: MagicLinkNotificationPort,
|
|
|
|
|
logger: Logger,
|
|
|
|
|
) => new ForgotPasswordUseCase(authRepo, magicLinkRepo, notificationPort, logger),
|
|
|
|
|
inject: [AUTH_REPOSITORY_TOKEN, MAGIC_LINK_REPOSITORY_TOKEN, MAGIC_LINK_NOTIFICATION_PORT_TOKEN, LOGGER_TOKEN],
|
|
|
|
|
@@ -129,9 +129,9 @@ export const AuthProviders: Provider[] = [
|
|
|
|
|
{
|
|
|
|
|
provide: RESET_PASSWORD_USE_CASE_TOKEN,
|
|
|
|
|
useFactory: (
|
|
|
|
|
authRepo: IAuthRepository,
|
|
|
|
|
magicLinkRepo: IMagicLinkRepository,
|
|
|
|
|
passwordHashing: IPasswordHashingService,
|
|
|
|
|
authRepo: AuthRepository,
|
|
|
|
|
magicLinkRepo: MagicLinkRepository,
|
|
|
|
|
passwordHashing: PasswordHashingService,
|
|
|
|
|
logger: Logger,
|
|
|
|
|
) => new ResetPasswordUseCase(authRepo, magicLinkRepo, passwordHashing, logger),
|
|
|
|
|
inject: [AUTH_REPOSITORY_TOKEN, MAGIC_LINK_REPOSITORY_TOKEN, PASSWORD_HASHING_SERVICE_TOKEN, LOGGER_TOKEN],
|
|
|
|
|
|