라우트 진입
POST /auth/login은 AuthGuard('local')가 먼저 가로채 username과 password를 Strategy로 보냅니다.
Local Auth
AuthGuard('local'), LocalStrategy, UsersService, AuthService의 책임을 분리하면 req.user가 생기는 위치와 401 응답의 이유가 선명해집니다.
POST /auth/login은 AuthGuard('local')가 먼저 가로채 username과 password를 Strategy로 보냅니다.
LocalStrategy.validate는 UsersService로 사용자를 찾고 비밀번호 비교 실패 시 UnauthorizedException을 냅니다.
검증된 객체는 Passport 흐름을 통해 req.user에 담기고 controller는 인증 결과만 응답합니다.
stateless API라면 session을 끄고, 서버 세션을 쓴다면 serializeUser 범위까지 설계합니다.