feat: X-Service-Code / X-API-KEY 서비스 식별 미들웨어 구현 (#32) #33
No reviewers
SPMS/Owners
Labels
No Label
Priority
High
Priority
Low
Priority
Medium
Priority
Non
Priority
Urgent
Status
Available
Status
Done
Status
In Progress
Type
Bug
Type
Chore
Type
Design
Type
Documentation
Type
Feature
Type
Improvement
Type
Refactor
Type
Research
Type
Task
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: SPMS/SPMS_API#33
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "feature/#32-service-code-middleware"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 작업 요약
🔗 관련 이슈 (Related Issues)
Closes #32
🛠️ 작업 내용 (Changes)
SPMS.Infrastructure/Persistence/Repositories/ServiceRepository.cs— IServiceRepository 구현 (GetByServiceCode, GetByApiKey, GetByIdWithIps, GetByStatus)SPMS.API/Middlewares/ServiceCodeMiddleware.cs— X-Service-Code 헤더 검증, DB 조회, 서비스 활성 상태 확인, HttpContext.Items 저장SPMS.API/Middlewares/ApiKeyMiddleware.cs— /v1/in/device/* 경로만 X-API-KEY 검증SPMS.Infrastructure/DependencyInjection.cs— IServiceRepository DI 등록 (AddScoped)SPMS.API/Extensions/ApplicationBuilderExtensions.cs— 미들웨어 파이프라인 12~13번 등록📢 리뷰어 참고 사항 (To Reviewers)
/v1/out/*,/swagger,/health경로를 예외 처리하여 공개 API와 Swagger UI에는 영향 없음/v1/in/device/*경로에서만 X-API-KEY 검증 수행✅ 체크리스트 (Self Checklist)
📸 스크린샷 / 테스트 로그 (Screenshots/Logs)