guard (1) 썸네일형 리스트형 [NestJs] AuthGuard 전략 복수개 적용하기 오늘은 AuthGuard를 이용하여, 해당 가드를 적용할건데 각기 다른 정책으로 관리가 되게 개발을 할 것이다. 쉽게 얘기하면, 한개는 일반 사용자인지, 즉 auth bearer token으로 요청을 하는지 또 한개는 해당 사용자이지만, 사업가의 authCode인지를 체크하는 것이다. 적용한 코드를 참고 바란다. 1.패키지 구조 2.auth-guard.ts import { ExecutionContext, Injectable } from "@nestjs/common"; import { AuthGuard as NestAuthGuard } from "@nestjs/passport"; import { Observable } from "rxjs"; @Injectable() export class JwtAuthGu.. 이전 1 다음