[Feature] API Key 발급/재발급 API (SEC-01~02) #46

Closed
opened 2026-02-09 15:09:06 +00:00 by seonkyu.kim · 0 comments
Owner

설명

API Key 재발급 API를 구현한다. (SEC-02)

SEC-01(발급)은 서비스 등록 시 자동 처리되므로, 재발급 API만 별도 구현

기능 상세

SEC-02: API Key 재발급

프로세스:

  1. 기존 API Key를 새로운 랜덤 키로 교체
  2. ApiKeyCreatedAt 타임스탬프 갱신
  3. 이전 키는 즉시 무효화 (유예 기간 없음)
  4. 평문 API Key를 응답으로 1회 반환

API:

  • POST /v1/in/service/{serviceCode}/apikey/refresh — API Key 재발급

체크리스트

Application Layer

  • SPMS.Application/DTOs/Service/ApiKeyRefreshResponseDto.cs
  • SPMS.Application/Interfaces/IServiceManagementService.cs — RefreshApiKeyAsync 추가
  • SPMS.Application/Services/ServiceManagementService.cs — 재발급 로직 구현

API Layer

  • SPMS.API/Controllers/ServiceController.cs — apikey/refresh 엔드포인트
  • Swagger 어노테이션 적용

검증

  • 빌드 성공 확인
  • 32~64자 랜덤 키 생성
  • 기존 키 즉시 무효화 확인
## 설명 API Key 재발급 API를 구현한다. (SEC-02) > SEC-01(발급)은 서비스 등록 시 자동 처리되므로, 재발급 API만 별도 구현 ## 기능 상세 ### SEC-02: API Key 재발급 **프로세스:** 1. 기존 API Key를 새로운 랜덤 키로 교체 2. ApiKeyCreatedAt 타임스탬프 갱신 3. 이전 키는 즉시 무효화 (유예 기간 없음) 4. 평문 API Key를 응답으로 1회 반환 **API:** - `POST /v1/in/service/{serviceCode}/apikey/refresh` — API Key 재발급 ## 체크리스트 ### Application Layer - [ ] `SPMS.Application/DTOs/Service/ApiKeyRefreshResponseDto.cs` - [ ] `SPMS.Application/Interfaces/IServiceManagementService.cs` — RefreshApiKeyAsync 추가 - [ ] `SPMS.Application/Services/ServiceManagementService.cs` — 재발급 로직 구현 ### API Layer - [ ] `SPMS.API/Controllers/ServiceController.cs` — apikey/refresh 엔드포인트 - [ ] Swagger 어노테이션 적용 ### 검증 - [ ] 빌드 성공 확인 - [ ] 32~64자 랜덤 키 생성 - [ ] 기존 키 즉시 무효화 확인
seonkyu.kim added the
Priority
High
Status
Available
Type
Feature
labels 2026-02-09 15:09:14 +00:00
seonkyu.kim added this to the Phase 2-1: 인증 & 계정 & 서비스 API milestone 2026-02-09 15:09:28 +00:00
seonkyu.kim self-assigned this 2026-02-09 15:09:29 +00:00
seonkyu.kim added
Status
Done
and removed
Status
Available
labels 2026-02-09 15:16:56 +00:00
Sign in to join this conversation.
No description provided.