Skip to content

Commit b37f90f

Browse files
committed
Refactor: Auto-Login 헤더 및 관련 로직 삭제
1 parent 2a3616d commit b37f90f

2 files changed

Lines changed: 0 additions & 5 deletions

File tree

core/network/src/main/java/com/threegap/bitnagil/network/auth/TokenAuthenticator.kt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ class TokenAuthenticator(
1919
private val authMutex = Mutex()
2020

2121
override fun authenticate(route: Route?, response: Response): Request? {
22-
if (response.request.header(AUTO_LOGIN_HEADER) != null) return null
2322
if (!shouldRetry(response)) return null
2423

2524
val currentToken = runBlocking { tokenProvider.getAccessToken() }
@@ -83,7 +82,6 @@ class TokenAuthenticator(
8382
private fun buildRequestWithToken(originalRequest: Request, token: String): Request {
8483
return originalRequest.newBuilder()
8584
.header(AUTHORIZATION, "$TOKEN_PREFIX $token")
86-
.removeHeader(AUTO_LOGIN_HEADER)
8785
.build()
8886
}
8987

@@ -98,6 +96,5 @@ class TokenAuthenticator(
9896
private const val AUTHORIZATION = "Authorization"
9997
private const val TOKEN_PREFIX = "Bearer"
10098
private const val SUCCESS_CODE = "CO000"
101-
private const val AUTO_LOGIN_HEADER = "Auto-Login"
10299
}
103100
}

data/src/main/java/com/threegap/bitnagil/data/auth/service/LoginService.kt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import com.threegap.bitnagil.data.auth.model.response.LoginResponse
55
import com.threegap.bitnagil.network.model.BaseResponse
66
import retrofit2.http.Body
77
import retrofit2.http.Header
8-
import retrofit2.http.Headers
98
import retrofit2.http.POST
109

1110
interface LoginService {
@@ -16,7 +15,6 @@ interface LoginService {
1615
): BaseResponse<LoginResponse>
1716

1817
@POST("/api/v1/auth/token/reissue")
19-
@Headers("Auto-Login: true")
2018
suspend fun postReissueToken(
2119
@Header("Refresh-Token") refreshToken: String,
2220
): BaseResponse<LoginResponse>

0 commit comments

Comments
 (0)