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

[Feat/#55] token interceptor + accessToken 재발급 + token 컨트롤 #63

Merged
merged 9 commits into from
Jan 10, 2024

Conversation

chattymin
Copy link
Member

⛳️ Work Description

  • token interceptor 추가 -> 자동 베어러 엑세스토큰 추가
  • access token 자동 재발급 로직 추가 -> 검증 미완료 상태
  • token 컨틀롤을 통해 accesstoken이 존재한다면 베어러 붙여서 통신, 없다면 바로 통신 -> 없는경우 : 카카오 토큰 컨트롤시

📸 Screenshot

📢 To Reviewers

  • 로그아웃, 회원탈퇴시 accesstoken, refreshtoken은 반드시 clear 해야합니다.
  • error code 추출 과정에서 문제가 생겨 해당부분 코드를 fix 할 예정입니다.

@chattymin chattymin added 동민 🐥 FEAT ✨ 새로운 기능 구현 labels Jan 10, 2024
@chattymin chattymin self-assigned this Jan 10, 2024
Copy link
Member

@leeeyubin leeeyubin 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 +6 to +8
interface SettingService {
@PATCH("api/users/signout")
suspend fun patchSignOut(): SignOutResponseDto
Copy link
Member

Choose a reason for hiding this comment

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

PATCH 저도 사용해야 하는데 참고하겠습니당

Copy link
Contributor

Choose a reason for hiding this comment

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

저두욤

Copy link
Member

@Marchbreeze Marchbreeze 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 +21 to +22
) : Interceptor {
override fun intercept(chain: Interceptor.Chain): Response {
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 8 to +9
fun setTokens(accessToken: String, refreshToken: String)
fun clearTokens()
Copy link
Member

Choose a reason for hiding this comment

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

줄바꿈 해주실 수 있나요 ㅋㅋ

@@ -26,7 +27,7 @@ class TendencyTestResultActivity :
with(binding) {
tvTendencyTestResultTitle.text = getString(R.string.tendency_test_result_title, "찐두릅")

viewModel?.mockTendencyResult?.apply {
viewModel.mockTendencyResult.apply {
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
Contributor

@crownjoe crownjoe 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 +6 to +8
interface SettingService {
@PATCH("api/users/signout")
suspend fun patchSignOut(): SignOutResponseDto
Copy link
Contributor

Choose a reason for hiding this comment

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

저두욤

Comment on lines 57 to 71
@Provides
@Singleton
fun provideOkHttpClient(
@JWT
fun provideAuthInterceptor(authInterceptor: AuthInterceptor): Interceptor = authInterceptor

@Provides
@Singleton
fun provideJWTOkHttpClient(
loggingInterceptor: Interceptor,
@JWT authInterceptor: Interceptor,
): OkHttpClient = OkHttpClient.Builder()
.addInterceptor(loggingInterceptor)
.addInterceptor(authInterceptor)
.build()

Copy link
Contributor

Choose a reason for hiding this comment

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

그는 신이다

@chattymin chattymin merged commit f7f71ac into develop Jan 10, 2024
1 check passed
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.

[FEAT] Server통신 Token Interceptor 추가
4 participants