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

[#765] Redis Token 저장시 TTL 설정되도록 리팩토링 #766

Merged
merged 1 commit into from
Dec 12, 2021

Conversation

binghe819
Copy link
Collaborator

상세 내용

  • 토큰 만료기간이 지나면 Redis에서 해당 토큰이 자동으로 삭제되도록 리팩토링

Close #765

@binghe819 binghe819 added backend 백엔드 이슈 refactor 리팩토링 이슈 labels Nov 10, 2021
@binghe819 binghe819 self-assigned this Nov 10, 2021
Copy link
Collaborator

@bperhaps bperhaps left a comment

Choose a reason for hiding this comment

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

TTL이 혹시 네트워크딴의 라우팅쪽 TTL 아니겠죠..

@binghe819
Copy link
Collaborator Author

그.. Redis에서 제공하는 expire 기능을 활용하기 위한 Time To Live 입니다ㅎㅎ

토큰 만료 기간에 맞춰서 토큰 만료 기간이 지나면 Redis에도 자동으로 토큰 관련 내용을 자동 삭제하기위해서 설정해두었어요~

Copy link
Collaborator

@da-nyee da-nyee left a comment

Choose a reason for hiding this comment

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

확인했습니다 👍

this.oAuthAccessTokenDao = new RedisOAuthAccessTokenDao(redisTemplate);
this.oAuthAccessTokenDao = new RedisOAuthAccessTokenDao(
redisTemplate,
Duration.ofHours(3).toMillis()
Copy link
Collaborator

Choose a reason for hiding this comment

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

그럼 AT은 3시간 동안 유지되는 건가요??

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

넵넵! 현재 토큰의 유효기간도 3시간이기때문에 동일하게 해두었습니다~

@binghe819 binghe819 merged commit 79b2c28 into develop Dec 12, 2021
@binghe819 binghe819 deleted the refactor/redis-token-ttl branch December 12, 2021 13:08
@da-nyee da-nyee mentioned this pull request Dec 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend 백엔드 이슈 refactor 리팩토링 이슈
Projects
None yet
3 participants