import { Module } from "@nestjs/common"; import { OauthService } from "./oauth.service.js"; import { OauthController, OauthAppsController } from "./oauth.controller.js"; /** * TASK-0129 — OAuth2 (authorization code + PKCE) for third-party apps. * * Depends only on the global `@Global()` CoreModule (PrismaService, * RedisService, AuditService) — no controller-level guards are needed * because every `/oauth/*` + app-CRUD path is handled inside the module: * - `/api/v1/oauth/*` is whitelisted PUBLIC in the global AuthGuard * (the code/token/revoke flows authenticate via cookie, PKCE, and * client secret — never a Bearer user JWT); * - the app-CRUD controller sits behind the GLOBAL AuthGuard (user JWT * or ADMIN API key) + `assertRole` OWNER/ADMIN inside the service. */ @Module({ controllers: [OauthController, OauthAppsController], providers: [OauthService], exports: [OauthService] }) export class OauthModule {}