Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/adolfok3/authorizationinterceptor.extensions.memorycache
An interceptor from AuthorizationInterceptor that uses a MemoryCache for handle authorization headers
https://github.com/adolfok3/authorizationinterceptor.extensions.memorycache
acesstoken auth authentication authorization cache csharp dotnet dotnetcore http httpclient memory request response toke
Last synced: 2 months ago
JSON representation
An interceptor from AuthorizationInterceptor that uses a MemoryCache for handle authorization headers
- Host: GitHub
- URL: https://github.com/adolfok3/authorizationinterceptor.extensions.memorycache
- Owner: Adolfok3
- License: mit
- Created: 2024-04-24T11:20:10.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-11-12T23:05:31.000Z (2 months ago)
- Last Synced: 2024-11-12T23:39:01.433Z (2 months ago)
- Topics: acesstoken, auth, authentication, authorization, cache, csharp, dotnet, dotnetcore, http, httpclient, memory, request, response, toke
- Language: C#
- Homepage:
- Size: 32.2 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
![AuthorizationInterceptor Icon](./resources/icon.png)
# AuthorizationInterceptor.Extensions.MemoryCache
[![GithubActions](https://github.com/Adolfok3/AuthorizationInterceptor.Extensions.MemoryCache/actions/workflows/main.yml/badge.svg)](https://github.com/Adolfok3/AuthorizationInterceptor.Extensions.MemoryCache/actions)
[![License](https://img.shields.io/badge/license-MIT-green)](./LICENSE)
[![Coverage Status](https://coveralls.io/repos/github/Adolfok3/AuthorizationInterceptor.Extensions.MemoryCache/badge.svg?branch=main)](https://coveralls.io/github/Adolfok3/AuthorizationInterceptor.Extensions.MemoryCache?branch=main)
[![NuGet Version](https://img.shields.io/nuget/vpre/AuthorizationInterceptor.Extensions.MemoryCache)](https://www.nuget.org/packages/AuthorizationInterceptor.Extensions.MemoryCache)An interceptor for [AuthorizationInterceptor](https://github.com/Adolfok3/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](https://github.com/Adolfok3/AuthorizationInterceptor).
### Installation
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
```### Setup
When adding Authorization Interceptor Handler, call the extension method `UseMemoryCacheInterceptor` to options:
```csharp
services.AddHttpClient("TargetApi")
.AddAuthorizationInterceptorHandler(options =>
{
options.UseMemoryCacheInterceptor();
})
```