Replies: 2 comments 5 replies
-
같이 의논하면 좋을 내용이 있는 것 같아요!
이러한 경우에, 높은 빈도로 요청이 있을 경우엔 성능상 문제가 발생할 것 같다고 생각이 들어요. 매 요청마다 같은 값을 반환하는 Key 값이지 않나요? @Component
public class JwtProvider {
private final Key key;
public JwtProvider(@Value("${secret.key") String secretKey) {
// JWT 서명을 위한 SecretKey 생성
this.key = Keys.hmacShaKeyFor(secretKey.getBytes(StandardCharsets.UTF_8));
}
// ... 이러한 경우에, 각 메서드마다 같은 값을 반환하는 키 생성 메서드를 호출하지 않아도 될 것 같아요! 태웅님 생각은 어떠신가요? |
Beta Was this translation helpful? Give feedback.
4 replies
-
정말 깔끔하게 잘 정리하셔서 놀랐습니다 고생하셨어요! 👍 ㅋㅋㅋㅋㅋㅋㅋㅋㅋ (글이 너무 잘 읽혀요..) |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
OAuth2란?
JWT란?
코드 구현 (카카오 로그인)
전체 실행 과정
0. 설정
build.gradle
application.properties
openssl rand -hex 64
을 입력SecuritryConfig.java
1. 사용자가 OAuth2 로그인 요청을 보냄
2. 로그인 페이지로 리다이렉트
3. JWT 발급 및 리다이렉트 (Handler, Provider, Service)
OAuth2SuccessHandler
JwtProvider
MemberService
MemberEntity
4. JWT를 사용한 인증 요청
5. JWT 검증 및 사용자 인증 (Filter, Provider)
JwtAuthenticationFilter
JwtProvider
6. 로그아웃 및 Refresh Token 무효화 (구현 예정)
Beta Was this translation helpful? Give feedback.
All reactions