{"repo":"wapplegate/AccessTokenClient","free":true,"listed":false,"github":"https://github.com/wapplegate/AccessTokenClient","clone":"git clone https://github.com/wapplegate/AccessTokenClient.git","description":"This .NET library simplifies client credentials access token requests with an access token client that can be reused for all your services.","language":"C#","stars":18,"topics":["client","credentials","oauth"],"license":"MIT","category":"auth-billing-email","readme_excerpt":"AccessTokenClient This library provides an access token client that can be used to make client credentials OAuth requests. Instead of re-writing the same access token clients over and over again for services, use this package to make those token requests. The package also includes the ability to cache access tokens in memory so they can be reused and provides extension points for custom cache implementations. Installation In order to begin using the token client, install the AccessTokenClient and AccessTokenClient.Extensions nuget packages. The extensions package includes a service collection extension method which will register the required services. Retrying Failed Token Requests The AddAccessTokenClient extension method accepts an action that can be used to configure the IHttpClientBuilder used internally when registering the token client. A custom policy to retry failed requests to the token endpoint can be provided. The AccessTokenClient.Extensions package contains a default retry policy which can be used. The default policy configures the token client to retry twice when a transient error has been encountered. It will wait one second between each retry. This retry functionality is not enabled by default. Caching By default, access tokens will not be cached. To enable caching, use the AddAccessTokenClientCache extension method and specify MemoryTokenResponseCache as a type argument as shown below. An implementation of IMemoryCache will need to be registered using the Add","default_branch":null,"files":null,"tree":[],"storefront":"/r/wapplegate","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/wapplegate/AccessTokenClient/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}