-
Notifications
You must be signed in to change notification settings - Fork 0
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] #274 - @DisableSwaggerSecurity 어노테이션 추가 및 리프레쉬 토큰을 통한 액세스 토큰 발급 로직 변경 #275
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 tasks
} | ||
|
||
private Info apiInfo() { | ||
return new Info() | ||
.title("BEAT Project API") | ||
.description("간편하게 소규모 공연을 등록하고 관리할 수 있는 티켓 예매 플랫폼") | ||
.version("1.1.0"); | ||
.version("1.2.0"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
디테일 굿입니다 👍
hyerinhwang-sailin
approved these changes
Dec 2, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
swagger에서 각 api들의 인증 필요 여부를 명시적으로 표현하는 것,
보안을 위해 refreshToken을 request param이 아닌 header로 받고 accessToken과 분리된 로직으로 처리하는 것 모두 좋네요!! 고생하셨습니다 👍
1 task
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related issue 🛠
Work Description ✏️
참고링크
@DisableSwaggerSecurity 커스텀 어노테이션으로 Swagger UI에서 보안설정 비활성화
리프레쉬 토큰을 통한 액세스 토큰 발급 로직 변경
Trouble Shooting ⚽️
Authorization 헤더 중복 처리 문제
Authorization 헤더 중복 처리 문제 해결
Authorization_Refresh
라는 별도의 헤더명을 사용해 Refresh Token 요청을 구분하면 문제를 간단히 해결하였습니다.JwtAuthenticationFilter
제거해주지만, 리프레쉬 토큰을 헤더에 담을 경우AuthenticationService
의generateAccessTokenFromRefreshToken
에서 Bearer 접두사를 제거해줍니다.Related ScreenShot 📷
Authorization_Refresh
를 명시하고 해당 value로 리프레쉬 토큰 값을 넣어주면 성공적으로 액세스 토큰이 발급되어짐을 확인했습니다.(하단 data에 있는accessToken
값은 보안상의 이유로 캡쳐를 하지 않았습니다)Uncompleted Tasks 😅
To Reviewers 📢