TIL

2021.06.23~24 기록장

Gisungcu 2021. 6. 23. 00:03

ToDo

  • 책 읽기
  • 지원
  • 알고리즘 공부
  • 미션 (메일)

Done

  • 미션 (메일)
  • 지원

Weekly goal

  • 책 읽기
  • 블로그 읽기

Feeling

메일 기능을 구현했다. 카프카 등은 이용하지 않고 진행했다.

 

https://moonong.tistory.com/45

 

[Spring/Java] 회원가입 이메일 인증 구현하기

많은 사이트에서 회원가입 시 이메일 인증을 요구하고 있다. 이메일로 인증번호를 발송하여 해당 인증번호를 입력하게 하는 경우도 있지만, 회원가입 시 인증 메일을 보내, 해당 메일에서 링크

moonong.tistory.com

 

user 테이블에서 인증된 유저인지 아닌지를 판단해서 가지고 온다. 막바지에 구현만 해서 별다른 코드는 없다.

https://velog.io/@ayoung0073/springboot-email-authentication

 

[SpringBoot] 이메일 인증 코드 보내기

본인 인증

velog.io

 

 

jwt 로그아웃.

 

로그아웃을 처음 생각했을 때는 jwt의 만료시간을 현재로 해서 끝내려 했는데, 이것은 불가능했다. 만료시간이 토큰의 일부였기에 

https://stackoverflow.com/questions/38306678/how-can-i-reset-the-jwt-token-expiration-time

 

How can I reset the JWT token expiration time?

I have created a JWT token along with expiration time for authentication purpose. Each time when a url hits in the application i am checking for the token. I want to increase the JWT token expiration

stackoverflow.com

 

jwt 로그아웃 방법들이다.

답변은 클라이언트에서 삭제하거나 레디스에 블랙리스트를 만들라고 하는데..

https://stackoverflow.com/questions/37959945/how-to-destroy-jwt-tokens-on-logout

 

How to destroy JWT Tokens on logout?

I am using jwt plugin and strategy in hapijs. I am able to create jwt token while login user and authenticate other API using the same token through 'jwt' strategy. I am setting the token in requ...

stackoverflow.com

https://stackoverflow.com/questions/21978658/invalidating-json-web-tokens

 

Invalidating JSON Web Tokens

For a new node.js project I'm working on, I'm thinking about switching over from a cookie based session approach (by this, I mean, storing an id to a key-value store containing user sessions in a u...

stackoverflow.com

 

logout 관련

https://www.baeldung.com/spring-security-logout