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

YEL-42 [feat] 소셜 로그인 API 및 Authorization 구현 #34

Merged
merged 4 commits into from
Jul 12, 2023

Conversation

devkwonsehoon
Copy link
Contributor

☘️ Related Issue

  • resolves YEL-42

✅ Work description

  • 기존 의제 코드를 참고하여 소셜 로그인 API 구현
  • Jwt 기반의 시큐리티 설정 및 필터 구현

💡 PR point

@devkwonsehoon devkwonsehoon added feat 새로운 기능 구현 세훈🧦 labels Jul 11, 2023
@devkwonsehoon devkwonsehoon self-assigned this Jul 11, 2023
Copy link
Member

@euije euije left a comment

Choose a reason for hiding this comment

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

덕분에 많이 배우고 갑니다

Comment on lines +40 to +47
@ExceptionHandler({
CustomAuthenticationException.class,
ExpiredTokenException.class,
InvalidTokenException.class,
NotSignedInException.class,
OAuthException.class
})
public ResponseEntity<BaseResponse> UnauthorizedException(CustomException exception) {
Copy link
Member

Choose a reason for hiding this comment

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

경의롭습니다!

Copy link
Member

Choose a reason for hiding this comment

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

최곱니다!

Copy link
Member

Choose a reason for hiding this comment

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

엇 근데 이거 exception 수정된거로 바꿔야하는거 아닌가요?

Comment on lines +45 to +48
.addFilterBefore(new ExceptionHandlerFilter(), UsernamePasswordAuthenticationFilter.class)
.addFilterBefore(new JwtFilter(new JwtTokenProvider(), secretKey),
UsernamePasswordAuthenticationFilter.class)
.addFilterBefore(new JwtExceptionFilter(), JwtFilter.class)
Copy link
Member

Choose a reason for hiding this comment

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

이렇게 되면 코드 순서대로 filter가 순서를 이루게 되나요?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

넴 맞슴다

Comment on lines +36 to +39
if (requestPath.startsWith("/api/v1/auth/oauth")) {
filterChain.doFilter(request, response);
return;
}
Copy link
Member

Choose a reason for hiding this comment

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

향후 비인가 API 리스트 코드에 반영할게요~!

Copy link
Member

@hyeonjeongs hyeonjeongs left a comment

Choose a reason for hiding this comment

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

역시 대단하십니다. 수고하셨습니다!

Comment on lines +22 to +24
private static final Long accessTokenValidTime = ofHours(4).toMillis();
private static final Long refreshTokenValidTime = ofDays(14).toMillis();

Copy link
Member

Choose a reason for hiding this comment

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

숫자는 static으로 선언한거 갖고오는게 어떤가요?

Comment on lines +40 to +47
@ExceptionHandler({
CustomAuthenticationException.class,
ExpiredTokenException.class,
InvalidTokenException.class,
NotSignedInException.class,
OAuthException.class
})
public ResponseEntity<BaseResponse> UnauthorizedException(CustomException exception) {
Copy link
Member

Choose a reason for hiding this comment

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

최곱니다!

Comment on lines +40 to +47
@ExceptionHandler({
CustomAuthenticationException.class,
ExpiredTokenException.class,
InvalidTokenException.class,
NotSignedInException.class,
OAuthException.class
})
public ResponseEntity<BaseResponse> UnauthorizedException(CustomException exception) {
Copy link
Member

Choose a reason for hiding this comment

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

엇 근데 이거 exception 수정된거로 바꿔야하는거 아닌가요?

@euije euije merged commit 456b2c7 into develop Jul 12, 2023
1 check passed
@euije euije deleted the feat/YEL-42 branch July 12, 2023 10:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat 새로운 기능 구현 세훈🧦
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants