[Feature] JWT 인증 모듈 구현 (Access + Refresh Token) #20

Closed
opened 2026-02-09 05:56:36 +00:00 by seonkyu.kim · 0 comments
Owner

설명

JWT 기반 인증 체계를 구현한다. Access Token과 Refresh Token을 지원한다.

📌 참조: Documents/ProgramSetup.md §6 (JWT 인증/인가 설정) 및 §7 (파이프라인 순서 10~11번)

체크리스트

  • SPMS.Application/Interfaces/IJwtService.cs — JWT 서비스 인터페이스
  • SPMS.Application/Settings/JwtSettings.cs — JWT 설정 POCO (Options Pattern)
  • SPMS.Infrastructure/Auth/JwtService.cs — JWT 생성/검증 구현
    • Access Token 생성 (Claim: AdminId, Role, ServiceCode)
    • Access Token 검증
    • Refresh Token 생성 (랜덤 문자열)
  • SPMS.API/Extensions/AuthenticationExtensions.cs — AddJwtAuthentication, AddAuthorizationPolicies 확장 메서드
  • appsettings JwtSettings 바인딩 (SecretKey, Issuer, Audience, ExpiryMinutes, RefreshTokenExpiryDays)
  • Program.cs에 Authentication/Authorization 서비스 등록 (파이프라인 순서 10~11번)
  • NuGet 패키지 추가 (System.IdentityModel.Tokens.Jwt, Microsoft.AspNetCore.Authentication.JwtBearer)
  • [Authorize], [AllowAnonymous] 어트리뷰트 적용 준비
  • 빌드 성공 확인
## 설명 JWT 기반 인증 체계를 구현한다. Access Token과 Refresh Token을 지원한다. > 📌 참조: `Documents/ProgramSetup.md` §6 (JWT 인증/인가 설정) 및 §7 (파이프라인 순서 10~11번) ## 체크리스트 - [x] `SPMS.Application/Interfaces/IJwtService.cs` — JWT 서비스 인터페이스 - [x] `SPMS.Application/Settings/JwtSettings.cs` — JWT 설정 POCO (Options Pattern) - [x] `SPMS.Infrastructure/Auth/JwtService.cs` — JWT 생성/검증 구현 - Access Token 생성 (Claim: AdminId, Role, ServiceCode) - Access Token 검증 - Refresh Token 생성 (랜덤 문자열) - [x] `SPMS.API/Extensions/AuthenticationExtensions.cs` — AddJwtAuthentication, AddAuthorizationPolicies 확장 메서드 - [x] appsettings JwtSettings 바인딩 (SecretKey, Issuer, Audience, ExpiryMinutes, RefreshTokenExpiryDays) - [x] Program.cs에 Authentication/Authorization 서비스 등록 (파이프라인 순서 10~11번) - [x] NuGet 패키지 추가 (System.IdentityModel.Tokens.Jwt, Microsoft.AspNetCore.Authentication.JwtBearer) - [x] `[Authorize]`, `[AllowAnonymous]` 어트리뷰트 적용 준비 - [x] 빌드 성공 확인
seonkyu.kim added the
Priority
Urgent
Status
Available
Type
Feature
labels 2026-02-09 05:56:47 +00:00
seonkyu.kim self-assigned this 2026-02-09 05:56:48 +00:00
seonkyu.kim added this to the Phase 1: 인프라 & 공통 모듈 milestone 2026-02-09 05:56:49 +00:00
seonkyu.kim added
Status
In Progress
and removed
Status
Available
labels 2026-02-09 06:00:45 +00:00
seonkyu.kim added
Status
Done
and removed
Status
In Progress
labels 2026-02-09 06:05:42 +00:00
Sign in to join this conversation.
No description provided.