An interceptor for AuthorizationInterceptor that uses a in Memory cache to handle authorization headers. For more information on how to configure and use Authorization Interceptor, please check the main page of AuthorizationInterceptor.
Run the following command in package manager console:
PM> Install-Package AuthorizationInterceptor.Extensions.MemoryCache
Or from the .NET CLI as:
dotnet add package AuthorizationInterceptor.Extensions.MemoryCache
When adding Authorization Interceptor Handler, call the extension method UseMemoryCacheInterceptor
to options:
services.AddHttpClient("TargetApi")
.AddAuthorizationInterceptorHandler<TargetApiAuthClass>(options =>
{
options.UseMemoryCacheInterceptor();
})