Skip to content

Refresh Token 기반 토큰 재발급 API 추가#230

Merged
ckdals4600 merged 2 commits into
mainfrom
feat/#229-access-token-reissue-api
May 24, 2026
Merged

Refresh Token 기반 토큰 재발급 API 추가#230
ckdals4600 merged 2 commits into
mainfrom
feat/#229-access-token-reissue-api

Conversation

@ckdals4600
Copy link
Copy Markdown
Contributor

@ckdals4600 ckdals4600 commented May 16, 2026

관련 이슈

PR 설명

유효한 Refresh Token을 기반으로 새로운 토큰을 재발급하는 Reissue API를 구현

작업 내용

1. 토큰 재발급 API 구현 (AuthController, AuthApi)

  • Endpoint 추가: POST /v1/auth/reissue
  • 요청에 포함된 쿠키(refreshToken)를 읽어들여 검증을 수행하고, 새로운 토큰 쌍을 다시 쿠키로 응답하도록 컨트롤러 계층을 구성

2. 비즈니스 로직 및 RTR 정책 적용 (AuthService)

  • reissue 메서드를 통해 전달받은 Refresh Token의 서명과 만료 여부를 검증
  • 유효성 검증을 통과하면 새로운 Access Token과 Refresh Token을 동시에 발급하는 RTR 방식 적용

3. Cookie 설정 로직 공통화 및 리팩토링 (CookieUtils, OAuth2SuccessHandler)

  • 리팩토링: 기존 OAuth2SuccessHandler 내부에 종속되어 있던 Set-Cookie 로직을 분리하여 CookieUtils 컴포넌트로 유틸화
  • OAuth2SuccessHandlerAuthController가 동일한 CookieUtils를 참조하도록 하여 응답 일관성 유지

@ckdals4600 ckdals4600 self-assigned this May 16, 2026
@ckdals4600 ckdals4600 linked an issue May 16, 2026 that may be closed by this pull request
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 16, 2026

📊 코드 커버리지 리포트

Overall Project 93.95% -0.12% 🍏
Files changed 96.74% 🍏

File Coverage
AuthService.java 100% 🍏
AuthController.java 100% 🍏
CookieUtils.java 100% 🍏
JwtTokenProvider.java 91.15% -2.31% 🍏

Comment thread src/main/java/com/sofa/linkiving/domain/auth/controller/AuthController.java Outdated
@ckdals4600 ckdals4600 force-pushed the feat/#229-access-token-reissue-api branch from 2e45591 to 74b5ffd Compare May 20, 2026 20:39
@ckdals4600 ckdals4600 requested a review from Goder-0 May 22, 2026 14:37
Copy link
Copy Markdown
Contributor

@Goder-0 Goder-0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Goder-0
Copy link
Copy Markdown
Contributor

Goder-0 commented May 22, 2026

@ckdals4600 머지 후에 Team-SoFa/linkiving#504 에 코멘트로 @Seong-Myeong 멘션 부탁드립니다.

@ckdals4600 ckdals4600 force-pushed the feat/#229-access-token-reissue-api branch from 74b5ffd to b96d786 Compare May 22, 2026 19:40
@ckdals4600 ckdals4600 merged commit ef03b63 into main May 24, 2026
1 check passed
@ckdals4600 ckdals4600 deleted the feat/#229-access-token-reissue-api branch May 24, 2026 08:39
@ckdals4600
Copy link
Copy Markdown
Contributor Author

@Seong-Myeong 토큰 재발급 API 추가 완료하였습니다. 확인 부탁드립니다.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Refresh Token 기반 Token Reissue API 개발

2 participants