Skip to content

Commit

Permalink
Add logo & package info.
Browse files Browse the repository at this point in the history
  • Loading branch information
RobThree committed Feb 19, 2024
1 parent 458e829 commit c990d03
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,32 @@
<LangVersion>latest</LangVersion>
<EnableNETAnalyzers>true</EnableNETAnalyzers>
<AnalysisLevel>latest</AnalysisLevel>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<Title>AutoRefreshTokenHttpMessageHandler</Title>
<Authors>RobIII</Authors>
<Company>Devcorner.nl</Company>
<Description>A thread-safe implementation of a DelegatingHandler that automatically refreshes the access token when the access token expires whilst **not** serializing all requests.</Description>
<Copyright>(C) 2024 Devcorner.nl</Copyright>
<PackageProjectUrl>https://github.com/RobThree/AutoRefreshTokenHttpMessageHandler</PackageProjectUrl>
<PackageReadmeFile>README.md</PackageReadmeFile>
<RepositoryUrl>https://github.com/RobThree/AutoRefreshTokenHttpMessageHandler.git</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PackageTags>accesstoken;refreshtoken;delegatinghandler</PackageTags>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageIcon>logo.png</PackageIcon>
</PropertyGroup>

<ItemGroup>
<None Include="..\logo.png">
<Pack>True</Pack>
<PackagePath>\</PackagePath>
</None>
<None Include="..\README.md">
<Pack>True</Pack>
<PackagePath>\</PackagePath>
</None>
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Options" Version="8.0.2" />
</ItemGroup>
Expand Down
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# AutoRefreshTokenHttpMessageHandler
# ![icon.png](icon.png) AutoRefreshTokenHttpMessageHandler

This is a thread-safe implementation of a `DelegatingHandler` that automatically refreshes the access token when the access token expires whilst **not** serializing all requests. Most implementations use a lock internally which essentially makes all async actions synchronous again. This implementation only blocks during the actual refresh. Inspired by Bryan Helms' [Thread-Safe Auth Token Store Using ConcurrentDictionary and AsyncLazy](https://bryanhelms.com/2021/03/29/thread-safe-auth-token-store-using-concurrentdictionary-and-asynclazy.html).

Expand Down Expand Up @@ -73,4 +73,8 @@ builder.Services.AddHttpClient<MyService>()
"TokenEndpoint": "http://auth.myservice.com/realms/myapi/protocol/openid-connect/token"
}
}
```
```

## Attribution

Icon by [Freepik](https://www.freepik.com/icon/key_908229)
Binary file added icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit c990d03

Please sign in to comment.