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

[BE] issue50: 로그인 기능 리팩터링 #115

Merged
merged 7 commits into from
Jul 25, 2022

Conversation

jaejae-yoo
Copy link
Collaborator

@jaejae-yoo jaejae-yoo commented Jul 24, 2022

요약

로그인 기능을 리팩터링한다.

#50
#76

세부사항

  • 리팩터링

    • TokenProvider 인터페이스 선언
    • TokenProvider 테스트 추가
    • Config 설정 클래스 이름 변경
    • 리졸버 TokenProvider 빈 생성자 주입으로 변경
  • 새로 생성한 부분

    • Authentication 인터셉터 테스트 생성
    • Authentication 리졸버 테스트 생성

close

@jaejae-yoo jaejae-yoo added 🖥 backend New backend feature 🛠 refactoring Refactor code labels Jul 24, 2022
Comment on lines +5 to +9
String createToken(final Long payload);

String getPayload(final String token);

boolean validateToken(final String token);
Copy link
Collaborator

Choose a reason for hiding this comment

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

인터페이스를 두어서 외부 라이브러리에 의존하는 JwtTokenProvider와 분리하는 것 굿굿!!👍

import org.springframework.http.HttpMethod;

@SpringBootTest
class AuthenticationInterceptorTest {
Copy link
Collaborator

Choose a reason for hiding this comment

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

꼼꼼한 테스트 코드 추가 👍👍

@jaejae-yoo jaejae-yoo merged commit ec48886 into develop Jul 25, 2022
@jaejae-yoo jaejae-yoo deleted the refactoring/issue-50-login branch July 25, 2022 10:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🖥 backend New backend feature 🛠 refactoring Refactor code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants