사용자관리 등록

This commit is contained in:
kjs
2025-08-25 13:12:17 +09:00
parent 8667cb4780
commit ce130ee225
9 changed files with 1256 additions and 170 deletions

View File

@@ -1,12 +1,14 @@
// 인증 서비스
// 기존 Java LoginService를 Node.js로 포팅
import prisma from "../config/database";
import { PasswordUtils } from "../utils/passwordUtils";
import { PrismaClient } from "@prisma/client";
import { JwtUtils } from "../utils/jwtUtils";
import { EncryptUtil } from "../utils/encryptUtil";
import { PersonBean, LoginResult, LoginLogData } from "../types/auth";
import { logger } from "../utils/logger";
const prisma = new PrismaClient();
export class AuthService {
/**
* 기존 Java LoginService.loginPwdCheck() 메서드 포팅
@@ -42,7 +44,7 @@ export class AuthService {
}
// 비밀번호 검증 (기존 EncryptUtil 로직 사용)
if (PasswordUtils.matches(password, dbPassword)) {
if (EncryptUtil.matches(password, dbPassword)) {
logger.info(`비밀번호 일치로 로그인 성공: ${userId}`);
return {
loginResult: true,