Skip to content

Instantly share code, notes, and snippets.

@aasitnikov
Created May 2, 2020 10:09
Show Gist options
  • Save aasitnikov/1df9687d05bec8f8788f2b70519fe245 to your computer and use it in GitHub Desktop.
Save aasitnikov/1df9687d05bec8f8788f2b70519fe245 to your computer and use it in GitHub Desktop.
class HttpClient @Inject constructor(
val authenticator: Authenticator
)
class Authenticator @Inject constructor(
val apiService: ApiService
) {
fun authenticate() {
apiService.get().doAuthCall() // Use apiService to authenticate
}
}
class ApiService @Inject constructor(
val client: HttpClient
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment