Commit Graph

15 Commits

Author SHA1 Message Date
kjs 70e040db39 Enhance user management and token invalidation features
- Added comprehensive validation for user data during registration and updates, including email format, company code existence, user type validation, and password length checks.
- Implemented JWT token invalidation for users when their status changes or when roles are updated, ensuring security and compliance with the latest policies.
- Introduced a new TokenInvalidationService to manage token versioning and invalidation processes efficiently.
- Updated the admin controller to provide detailed error messages and success responses for user status changes and validations.
- Enhanced the authentication middleware to check token versions against the database, ensuring that invalidated tokens cannot be used.

This commit improves the overall security and user management experience within the application.
2026-03-25 18:47:50 +09:00
DDD1542 4294e6206b feat: Add express-async-errors for improved error handling
- Integrated express-async-errors to automatically handle errors in async route handlers, enhancing the overall error management in the application.
- Updated app.ts to include the express-async-errors import for global error handling.
- Removed redundant logging statements in admin and user menu retrieval functions to streamline the code and improve readability.
- Adjusted logging levels from info to debug for less critical logs, ensuring that important information is logged appropriately without cluttering the logs.
2026-02-12 11:42:52 +09:00
dohyeons 9c3f1d26ad 차량관리(기초데이터) 구현 2025-12-01 18:41:02 +09:00
dohyeons efaa267d78 분할 패널에서 부서 추가 기능 구현 2025-11-07 14:22:23 +09:00
kjs 29c49d7f07 각 회사별 데이터 분리 2025-10-27 16:40:59 +09:00
kjs 824e5f4827 feat: Complete Phase 1.5 - AuthService Raw Query migration
Phase 1.5 완료: 인증 서비스 Raw Query 전환 및 테스트 완료

 AuthService 전환 완료 (5개 Prisma 호출 제거):
- loginPwdCheck(): Raw Query로 사용자 비밀번호 조회
- insertLoginAccessLog(): Raw Query로 로그인 로그 기록
- getUserInfo(): Raw Query로 사용자/권한/회사 정보 조회
  - authority_sub_user ↔ authority_master JOIN (master_objid ↔ objid)
  - 3개 쿼리로 분리 (사용자, 권한, 회사)
- processLogin(): 전체 로그인 플로우 통합
- processLogout(): 로그아웃 로그 기록

🧪 테스트 완료:
- 단위 테스트: 30개 테스트 모두 통과 
  - 로그인 검증 (6개)
  - 사용자 정보 조회 (5개)
  - 로그인 로그 기록 (4개)
  - 전체 로그인 프로세스 (5개)
  - 로그아웃 (2개)
  - 토큰 검증 (3개)
  - Raw Query 전환 검증 (3개)
  - 성능 테스트 (2개)
- 통합 테스트: 작성 완료 (auth.integration.test.ts)
  - 로그인 → 토큰 발급 → 인증 → 로그아웃 플로우

🔧 주요 변경사항:
- Prisma import 제거 → Raw Query (query from db.ts)
- authority 테이블 JOIN 수정 (auth_code → master_objid/objid)
- 파라미터 바인딩으로 SQL Injection 방지
- 타입 안전성 유지 (TypeScript Generic 사용)

📊 성능:
- 로그인 프로세스: < 1초
- 사용자 정보 조회: < 500ms
- 모든 테스트 실행 시간: 2.016초

🎯 다음 단계:
- Phase 2: 핵심 서비스 전환 (ScreenManagement, TableManagement 등)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-30 15:59:32 +09:00
kjs 3c26f24179 버튼에 제어 달기 2025-09-29 15:21:14 +09:00
kjs cedb5e3ec3 에러 수정 2025-09-29 10:23:21 +09:00
kjs dd902cafab 백엔드 에러수정 2025-09-25 11:04:02 +09:00
kjs d73be8a4d3 파일 컴포넌트 분리 2025-09-05 21:52:19 +09:00
kjs def192641b 테이블 타입관리 에러 2025-09-01 15:22:47 +09:00
hyeonsu b365969c72 Raw SQL을 Prisma ORM으로 마이그레이션 2025-09-01 14:52:00 +09:00
hyeonsu 49f812f444 프로필 이미지 기능 수정 2025-08-28 10:05:06 +09:00
kjs ce130ee225 사용자관리 등록 2025-08-25 13:12:17 +09:00
kjs a0e5b57a24 최초커밋 2025-08-21 09:41:46 +09:00