-
Notifications
You must be signed in to change notification settings - Fork 214
Custom HttpClient not used for every call to the service #1488
Comments
Same issue here. |
Hello, this works and that's the same behavior as setting the proxy on web.config, but our customer wants to isolate only the ADAL calls through a specific proxy with specific credentials. |
Hi Bogdan, This is a problem for us, since we're behind corporate firewall. |
Hello, |
Hi, we are also behind a corporate proxy and very interested in a solution to that. |
This is being actively worked on. |
We are also facing same issue in our test server, I think ADAL API is not allowing it to read the proxy values passed in the HttpClient object for the AuthenticationContext call. It will work fine when we add proxy in IE for that user account login only but we can not do this. Also we can not add proxy on system level. Please let us know the ETA for this. This is impacting by holding the multiple application's production release from one month. |
PR: #1530 |
It looks like the custom IHttpClientFactory passed to the new AuthenticationContext constructor is not actually used further. It's because of this code: Lines 70 to 80 in c66dc64
So even if the httpClientFactory parameter is not null it's not being passed to the ServiceBundle constructor. |
@zapalap this has been fixed and will be in 5.0.1-preview release. fix is merged into dev. thank you. |
included in ADAL 5.0.1-preview |
Which Version of ADAL are you using ?
4.5
Which platform has the issue?
all
Repro
Use the new AuthenticationContext constructor that takes in an
HttpClient
. Some flows use a new HttpClient everytime.Expected behavior
the passed in httpclient should be used everywhere
Actual behavior
the httpClient is not used in some calls, such as the auth code request.
the custom httpClient is used for calls to the MEX endpoint.
Note: this is where we create a new HttpClient https://github.com:443/AzureAD/azure-activedirectory-library-for-dotnet.git/blob/dev/src/Microsoft.IdentityModel.Clients.ActiveDirectory/Internal/Http/HttpClientWrapper.cs#L66
This is also bad for perf, because we should reuse this httpClient.
The text was updated successfully, but these errors were encountered: