Conversation
wonslee
approved these changes
Dec 8, 2023
wonslee
left a comment
Member
There was a problem hiding this comment.
정상동작 확인했습니다 👍
재발행이 확실히 더 빨라지겠네요
|
|
||
| private final PrincipalDetailService principalDetailService; | ||
| private final Key privatekey; | ||
| private final Key privateKey; |
| Date now = new Date(System.currentTimeMillis()); | ||
| return Jwts.builder() | ||
| .setSubject(customEncryptUtil.encrypt(socialEmail)) | ||
| .claim("role", role) |
This file contains hidden or 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
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.
PR 요약
토큰 재발행 시 DB 거치는 프로세스 삭제
구현한 내용 또는 수정한 내용
기존 - 토큰 재발행 시 User의 Role을 최신화 하기 위해 user 조회 후 재발행 (DB 거침)
바뀐 점 - RefreshToken 내에 claim으로 role을 추가해서 user 조회하는 것을 없앰
대신 추후에 만약 Role이 변경 될 상황이 있을 시 Role이 변경된 토큰으로 토큰 재발행 다시 하면 문제 없을 것이라고 판단.
추가로 알리고 싶은 내용
관련 이슈
현재 사용되고 있는 refreshToken을 사용하게 되면 에러가 날 듯함. 기존 유저들은 새로 다시 다 로그인 해야함...
해결할 수 있는 방안 같이 논의해봐요!
체크리스트