Version v5.4.0-beta1. Add authenticator to oauth retrofit.

This commit is contained in:
Docile-Alligator 2022-12-04 19:17:05 +11:00
parent 58881337c8
commit 68ed718aa0

View File

@ -56,9 +56,10 @@ abstract class NetworkModule {
@Provides @Provides
@Named("oauth") @Named("oauth")
static Retrofit providesOAuthRetrofit(Retrofit retrofit) { static Retrofit providesOAuthRetrofit(Retrofit retrofit, @Named("default") OkHttpClient okHttpClient) {
return retrofit.newBuilder() return retrofit.newBuilder()
.baseUrl(APIUtils.OAUTH_API_BASE_URI) .baseUrl(APIUtils.OAUTH_API_BASE_URI)
.client(okHttpClient)
.build(); .build();
} }
@ -192,17 +193,6 @@ abstract class NetworkModule {
.build(); .build();
} }
@Provides
@Named("strapi")
@Singleton
static Retrofit providestrapiRetrofit(@Named("default") OkHttpClient okHttpClient,
Retrofit retrofit) {
return retrofit.newBuilder()
.baseUrl(APIUtils.STRAPI_BASE_URI)
.client(okHttpClient)
.build();
}
@Provides @Provides
@Named("streamable") @Named("streamable")
@Singleton @Singleton