In one of our applications we had the following code to fetch a ClientCredentials token from IdentityServer. This access token could then be used to call another API from our backend:
After updating the IdentityModel NuGet package to the latest version, we got the following warnings:
|
The current code is using it’s own HttpClient instances and as you probably already know there were some problems with the HttpClient. These are fixed in ASP.NET Core 2.2 and therefore the IdentityModel team decided to update their API’s. Let’s get rid of these warnings by using the newly available extension methods: |
More information: https://leastprivilege.com/2018/06/18/making-the-identitymodel-client-libraries-httpclientfactory-friendly/