Skip to content

Commit

Permalink
[#228] Remove redundant line and refactor code format
Browse files Browse the repository at this point in the history
  • Loading branch information
kaungkhantsoe committed Jan 6, 2023
1 parent c79ef76 commit 08feca7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ class RetrofitModule {
fun provideApiService(retrofit: Retrofit): ApiService =
ApiServiceProvider.getApiService(retrofit)


@Authenticate
@Provides
fun provideAuthRetrofit(
Expand All @@ -54,6 +53,5 @@ class RetrofitModule {
@Provides
fun provideAuthService(
@Authenticate retrofit: Retrofit
): AuthService =
ApiServiceProvider.getAuthService(retrofit)
): AuthService = ApiServiceProvider.getAuthService(retrofit)
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import kotlinx.coroutines.flow.last
import okhttp3.*

const val REQUEST_HEADER_AUTHORIZATION = "Authorization"
const val HEADER_AUTHENTICATION_SKIPPING_ERROR_TYPE = "Authentication-Skipping-ErrorType"
private const val MAX_ATTEMPTS = 3

class ApplicationRequestAuthenticator(
private val tokenRefresher: TokenRefresher,
Expand Down Expand Up @@ -88,6 +90,3 @@ class ApplicationRequestAuthenticator(
return false
}
}

const val HEADER_AUTHENTICATION_SKIPPING_ERROR_TYPE = "Authentication-Skipping-ErrorType"
private const val MAX_ATTEMPTS = 3

0 comments on commit 08feca7

Please sign in to comment.