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

[fix] refreshToken 설계 오류 #54

Merged
merged 2 commits into from
Jan 12, 2024
Merged

[fix] refreshToken 설계 오류 #54

merged 2 commits into from
Jan 12, 2024

Conversation

tkdwns414
Copy link
Collaborator

@tkdwns414 tkdwns414 commented Jan 11, 2024

Related Issue 📌

Description ✔️

  • refreshToken과 accessToken이 같은 역할을 할 수 있게 설계되어서 수정을 했습니다.
  • refreshToken의 경우 role이 없고 accessToken의 경우 role이 있습니다.
  • JwtAuthenticationFilter에서 받은 토큰에 role이 없는 경우 오류를 일으킵니다 -> CustomJwtAuthenticationEnntryPoint의 response로 연결됩니다.
  • whitlelist에 v1/auth/reissue 를 경로로 추가하였지만 그것과 별개로 JwtAuthenticationFilter를 무조건 통과하게 되고 이때 role이 없기 때문에 오류가 일어나게 되므로 requestUri가 v1/auth/reissue일 경우 에러가 일어나지 않도록 분기처리를 했습니다.

@tkdwns414 tkdwns414 added the fix label Jan 11, 2024
@tkdwns414 tkdwns414 requested a review from Parkjyun January 11, 2024 21:15
@tkdwns414 tkdwns414 self-assigned this Jan 11, 2024
Copy link
Collaborator

@Parkjyun Parkjyun left a comment

Choose a reason for hiding this comment

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

LGTM입니다

@tkdwns414 tkdwns414 merged commit ea1ff89 into develop Jan 12, 2024
1 check passed
@tkdwns414 tkdwns414 deleted the fix/51 branch January 12, 2024 10:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[fix] refreshToken 설계 오류
2 participants