Skip to content
This repository has been archived by the owner on Aug 13, 2022. It is now read-only.

[#8] refresh token 생성기능 구현 #13

Open
wants to merge 4 commits into
base: ft/6
Choose a base branch
from
Open

[#8] refresh token 생성기능 구현 #13

wants to merge 4 commits into from

Conversation

msugo1
Copy link
Collaborator

@msugo1 msugo1 commented Nov 22, 2021

Issue

  • Jwt 토큰은 secretKey가 탈취되면 만료될 때까지 이를 막을 수 있는 방법이 없다고 한다.
  • 일차적인 부분은 secretKey를 잘 지키는 것이겠지만, 만일의 경우를 대비해서 보완책을 마련할 필요가 있다.

Idea

  • Jwt 토큰의 만료시간을 짧게 설정하되, refresh 토큰을 두어, 해당 토큰이 살아있는 동안 유저가 재 로그인 했을 때 새로운 accessToken을 발급해준다. (reissueToken api, service 메소드 추가)

* AuthController
- add an end point to accept reissue tokens for users with expred tokens.

* JwtTokenService
- `reissueToken`: handle the reissue token request

* AuthRepository
- refactor the names and a bit of contents so that this class seems more inclined to its own role as a repository.

* TokenSet
- a DTO class that will deliver sets of an access and refresh token
@msugo1 msugo1 self-assigned this Nov 22, 2021
@msugo1 msugo1 changed the title [#7] refresh token 생성기능 구현 [#8] refresh token 생성기능 구현 Nov 27, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant