feat(api): add auth guards

This commit is contained in:
dahyeon committed 2026-04-12 22:17:00 +09:00
1 parent 3a86676a12
commit d4b790fd86
16 files changed
+592

No files matched your search

+33
View File
@@ -0,0 +1,33 @@
import { Global, Module } from '@nestjs/common';
import { APP_GUARD } from '@nestjs/core';
import { AuthService } from './auth.service';
import { IdentityResolverGuard } from './identity-resolver.guard';
import { IdentityService } from './identity.service';
import { JwtAuthGuard } from './jwt.guard';
import { JwtService } from './jwt.service';
import { RolesGuard } from './roles.guard';
import { UserResolverGuard } from './user-resolver.guard';
@Global()
@Module({
providers: [
AuthService,
JwtService,
IdentityService,
JwtAuthGuard,
IdentityResolverGuard,
UserResolverGuard,
RolesGuard,
{ provide: APP_GUARD, useClass: JwtAuthGuard },
{ provide: APP_GUARD, useClass: IdentityResolverGuard },
{ provide: APP_GUARD, useClass: UserResolverGuard },
],
exports: [
AuthService,
JwtService,
IdentityService,
UserResolverGuard,
RolesGuard,
],
})
export class AuthModule {}