Barbed wire on a green background

Encapsulating getting access tokens from IdentityServer with a typed HttpClient and MessageHandler

Update 18. Dec 2021: The repo on GitHub has been updated to .NET 6. I also “containerized” all the apps so it’s easier to run them. Make sure to check it out! httpclient-token-identityserver Recently, I had to interact with an external API which is protected by JWT Bearer Tokens. For this, I had to get an access_token first and then set it to each request. But, this can get quite tedious very soon even if you just do it a few times....