2025-08-21 15:24:40 +09:00
|
|
|
import { Module } from "@nestjs/common";
|
|
|
|
|
import { PassportModule } from "@nestjs/passport";
|
2025-08-28 16:57:57 +09:00
|
|
|
import { APP_GUARD } from "@nestjs/core";
|
2025-12-10 16:08:34 +09:00
|
|
|
import { AuthFacade } from "./application/auth.facade.js";
|
|
|
|
|
import { AuthController } from "./presentation/http/auth.controller.js";
|
|
|
|
|
import { UsersModule } from "@bff/modules/users/users.module.js";
|
|
|
|
|
import { MappingsModule } from "@bff/modules/id-mappings/mappings.module.js";
|
|
|
|
|
import { IntegrationsModule } from "@bff/integrations/integrations.module.js";
|
|
|
|
|
import { JwtStrategy } from "./presentation/strategies/jwt.strategy.js";
|
|
|
|
|
import { LocalStrategy } from "./presentation/strategies/local.strategy.js";
|
|
|
|
|
import { GlobalAuthGuard } from "./presentation/http/guards/global-auth.guard.js";
|
|
|
|
|
import { TokenBlacklistService } from "./infra/token/token-blacklist.service.js";
|
|
|
|
|
import { EmailModule } from "@bff/infra/email/email.module.js";
|
|
|
|
|
import { CacheModule } from "@bff/infra/cache/cache.module.js";
|
|
|
|
|
import { AuthTokenService } from "./infra/token/token.service.js";
|
2025-12-11 12:03:31 +09:00
|
|
|
import { JoseJwtService } from "./infra/token/jose-jwt.service.js";
|
2025-12-10 16:08:34 +09:00
|
|
|
import { SignupWorkflowService } from "./infra/workflows/workflows/signup-workflow.service.js";
|
|
|
|
|
import { PasswordWorkflowService } from "./infra/workflows/workflows/password-workflow.service.js";
|
|
|
|
|
import { WhmcsLinkWorkflowService } from "./infra/workflows/workflows/whmcs-link-workflow.service.js";
|
|
|
|
|
import { FailedLoginThrottleGuard } from "./presentation/http/guards/failed-login-throttle.guard.js";
|
|
|
|
|
import { LoginResultInterceptor } from "./presentation/http/interceptors/login-result.interceptor.js";
|
|
|
|
|
import { AuthRateLimitService } from "./infra/rate-limiting/auth-rate-limit.service.js";
|
2025-08-20 18:02:50 +09:00
|
|
|
|
|
|
|
|
@Module({
|
|
|
|
|
imports: [
|
|
|
|
|
PassportModule,
|
|
|
|
|
UsersModule,
|
|
|
|
|
MappingsModule,
|
2025-09-17 18:43:43 +09:00
|
|
|
IntegrationsModule,
|
2025-08-23 17:24:37 +09:00
|
|
|
EmailModule,
|
2025-11-06 16:32:29 +09:00
|
|
|
CacheModule,
|
2025-08-20 18:02:50 +09:00
|
|
|
],
|
2025-10-02 18:35:26 +09:00
|
|
|
controllers: [AuthController],
|
2025-08-28 16:57:57 +09:00
|
|
|
providers: [
|
2025-10-02 16:33:25 +09:00
|
|
|
AuthFacade,
|
2025-08-28 16:57:57 +09:00
|
|
|
JwtStrategy,
|
|
|
|
|
LocalStrategy,
|
|
|
|
|
TokenBlacklistService,
|
2025-09-18 17:49:43 +09:00
|
|
|
AuthTokenService,
|
2025-12-11 12:03:31 +09:00
|
|
|
JoseJwtService,
|
2025-09-18 17:49:43 +09:00
|
|
|
SignupWorkflowService,
|
|
|
|
|
PasswordWorkflowService,
|
|
|
|
|
WhmcsLinkWorkflowService,
|
2025-09-27 17:51:54 +09:00
|
|
|
FailedLoginThrottleGuard,
|
2025-10-02 14:16:46 +09:00
|
|
|
AuthRateLimitService,
|
2025-09-27 17:51:54 +09:00
|
|
|
LoginResultInterceptor,
|
2025-08-28 16:57:57 +09:00
|
|
|
{
|
|
|
|
|
provide: APP_GUARD,
|
|
|
|
|
useClass: GlobalAuthGuard,
|
|
|
|
|
},
|
|
|
|
|
],
|
2025-10-02 18:35:26 +09:00
|
|
|
exports: [AuthFacade, TokenBlacklistService, AuthTokenService],
|
2025-08-20 18:02:50 +09:00
|
|
|
})
|
|
|
|
|
export class AuthModule {}
|