Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEAT/#31] 토큰 Refresh API 구현 #32

Merged
merged 9 commits into from
Jan 10, 2025
Merged

[FEAT/#31] 토큰 Refresh API 구현 #32

merged 9 commits into from
Jan 10, 2025

Conversation

hyunw9
Copy link
Contributor

@hyunw9 hyunw9 commented Jan 8, 2025

Related Issue 🚀

Work Description ✏️

  • 토큰 refresh API 를 구현했습니다.

PR Point 📸

  1. 클라이언트가 토큰 만료 결과를 받는다.
  2. 토큰 Refresh 호출
  3. RefreshToken parse 및 검증
  4. 실패 시 ( 만료, 기타 등등 ) 예외 반환
  5. 성공 시 refreshToken 갱신
  6. 갱신된 RefreshToken을 이용해 accessToken 갱신 후 반환

이 전체적인 로직입니다.

성은이가 만들어놓은 AuthenticateTokenInfo 랑 AuthenticationTokenInfo가 헷갈려서 착오가 있을 수 있지만..
혹시 오류 있다면 리뷰로 달아주시면 감사하겠습니다 !

hyunw9 added 3 commits January 8, 2025 23:35
AuthenticationTokenInfo -> Command로 변환하여 Usecase에 전달합니다.
jwtAuthRefreshTokenProvider에서 parse시 검증이 진행됩니다. (추가 검증 불필요)
@hyunw9 hyunw9 added the 🎁 feature 새로운 기능을 개발하거나 추가, 변경할 경우(spring boot 내의 기능 코드) label Jan 8, 2025
@hyunw9 hyunw9 requested a review from sung-silver January 8, 2025 14:48
@hyunw9 hyunw9 self-assigned this Jan 8, 2025
Copy link

height bot commented Jan 8, 2025

Link Height tasks by mentioning a task ID in the pull request title or commit messages, or description and comments with the keyword link (e.g. "Link T-123").

💡Tip: You can also use "Close T-X" to automatically close a task when the pull request is merged.

Copy link
Contributor

@sung-silver sung-silver left a comment

Choose a reason for hiding this comment

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

리뷰 한 번 확인부탁드립니다! 그리고 /refresh 토큰 재발급 로직을 컨트롤러에서 구현하면 security 경로 설정도 필요할 것 같은데 이 부분도 확인 부탁드려요!

Copy link
Member

@yummygyudon yummygyudon left a comment

Choose a reason for hiding this comment

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

고생하셨어요!! :)

확인해보시고 성은이가 남긴 리뷰와 중복되는 내용이 있다면 바로 성은이 리뷰 링크 남겨주시고 Resolve 처리해주시면 감사하겠습니다!

++
Refresh Token에 대해서 "While URL 추가" 등과 같이 별도 Filter 처리가 필요할 것으로 보이는데 PR 변경 내용에선 찾을 수가 없어서요!!

또한 로그인과 동일하게 Web/Native App 환경에 따른 분리가 필요할텐데 괜찮을까요?!

  • Web
    • ATK 발급 : Body
    • ATK 관리 : Header
    • RTK 발급 : Cookie
    • RTK 관리 : Cookie
  • App
    • ATK 발급 : Body
    • ATK 관리 : Header
    • RTK 발급 : Body
    • RTK 관리 : Local Storage & Body(재발급 요청 시)
      혹시 이유가 있나요?!!

Copy link
Contributor

@sung-silver sung-silver left a comment

Choose a reason for hiding this comment

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

한번 더 확인 부탁드립니다!!

Copy link
Contributor

@sung-silver sung-silver left a comment

Choose a reason for hiding this comment

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

수고하셨습니다!

@hyunw9 hyunw9 merged commit 2746db0 into dev Jan 10, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🎁 feature 새로운 기능을 개발하거나 추가, 변경할 경우(spring boot 내의 기능 코드) size/M
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEAT] 토큰 리프레시 로직 구현
3 participants