You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Similar to the issue #480, the ManagmentAPI builder set the value of the httpClient to an instantiated http client, which could then be overridden by callers.
Describe the ideal solution
Objects.nonNull(httpClient) ? httpClient : DefaultHttpClient.newBuilder().build() should be used in the build() method.
Alternatives and current workarounds
None.
Additional context
No response
The text was updated successfully, but these errors were encountered:
Btw, if you could think to an other way to keep the base url in private final HttpUrl baseUrl;(inside AuthAPI and ManagementAPI) it would then be possible to exclude OkHttp3 + Okio dependencies when using an other http client.
Thank you so much for bringing this up! We really appreciate your input. Could you please share a bit more detail or an example to help us better understand the issue? I'm not sure, but this change might potentially introduce a breaking change.
In the ManagementAPI class, the Builder at line 405 is instantiating a new client (private Auth0HttpClient httpClient = DefaultHttpClient.newBuilder().build();) even when it's not needed.
Example : if you call new ManagementAPI.Builder("myDomain","myToken").withHttpClient(myOwnClient).build(), a default client has been created for nothing.
Checklist
Describe the problem you'd like to have solved
Similar to the issue #480, the
ManagmentAPI
builder set the value of the httpClient to an instantiated http client, which could then be overridden by callers.Describe the ideal solution
Objects.nonNull(httpClient) ? httpClient : DefaultHttpClient.newBuilder().build()
should be used in thebuild()
method.Alternatives and current workarounds
None.
Additional context
No response
The text was updated successfully, but these errors were encountered: