File tree Expand file tree Collapse file tree
core/network/src/main/java/com/threegap/bitnagil/network/auth
data/src/main/java/com/threegap/bitnagil/data/auth/service Expand file tree Collapse file tree Original file line number Diff line number Diff 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}
Original file line number Diff line number Diff line change @@ -5,7 +5,6 @@ import com.threegap.bitnagil.data.auth.model.response.LoginResponse
55import com.threegap.bitnagil.network.model.BaseResponse
66import retrofit2.http.Body
77import retrofit2.http.Header
8- import retrofit2.http.Headers
98import retrofit2.http.POST
109
1110interface 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 >
You can’t perform that action at this time.
0 commit comments