moko-network
moko-network copied to clipboard
TokenFeature.TokenProvider should be a fun interface
Providing a TokenFeature.TokenProvider requires creating on object like this:
object : TokenFeature.TokenProvider {
override fun getToken() = "Bearer ${authentication.accessToken}"`
}
With the Kotlin 1.4 feature of functional interfaces, this interface should be declared as a fun interface allowing to provide a lambda so above code can be replaced with:
{ "Bearer ${authentication.accessToken}" }