user-service api 초안 개발

This commit is contained in:
wonho
2025-10-24 15:19:04 +09:00
parent 50cf1dbcf1
commit 34df9c3b8f
28 changed files with 1953 additions and 15 deletions
+12 -11
View File
@@ -51,7 +51,7 @@ paths:
- JWT 토큰 자동 발급
**처리 흐름:**
1. 중복 사용자 확인 (전화번호 기반)
1. 중복 사용자 확인 (이메일/전화번호 기반)
2. 비밀번호 해싱 (bcrypt)
3. User/Store 데이터베이스 트랜잭션 처리
4. JWT 토큰 생성 및 세션 저장 (Redis)
@@ -114,7 +114,7 @@ paths:
summary: 중복 사용자
value:
code: USER_001
message: 이미 가입된 전화번호입니다
message: 이미 가입된 이메일입니다
timestamp: 2025-10-22T10:30:00Z
validationError:
summary: 입력 검증 오류
@@ -140,7 +140,7 @@ paths:
**유저스토리:** UFR-USER-020
**주요 기능:**
- 전화번호/비밀번호 인증
- 이메일/비밀번호 인증
- JWT 토큰 발급
- Redis 세션 저장
- 최종 로그인 시각 업데이트 (비동기)
@@ -162,7 +162,7 @@ paths:
default:
summary: 로그인 요청 예시
value:
phoneNumber: "01012345678"
email: hong@example.com
password: "Password123!"
responses:
'200':
@@ -191,7 +191,7 @@ paths:
summary: 인증 실패
value:
code: AUTH_001
message: 전화번호 또는 비밀번호를 확인해주세요
message: 이메일 또는 비밀번호를 확인해주세요
timestamp: 2025-10-22T10:30:00Z
/users/logout:
@@ -679,14 +679,15 @@ components:
LoginRequest:
type: object
required:
- phoneNumber
- email
- password
properties:
phoneNumber:
email:
type: string
pattern: '^010\d{8}$'
description: 휴대폰 번호
example: "01012345678"
format: email
maxLength: 100
description: 이메일 주소
example: hong@example.com
password:
type: string
minLength: 8
@@ -977,7 +978,7 @@ components:
message:
type: string
description: 에러 메시지
example: 이미 가입된 전화번호입니다
example: 이미 가입된 이메일입니다
timestamp:
type: string
format: date-time