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