This PR utilises Polly's cache policy and the Microsoft MemoryCache to store the access token until it expires. The TTL on the cache item is determined from the Access Token response.
The Access Token cache is invoked at the top level of the decorator chain, and access token requests use all underlying decorators. In order to create a WaivesClient, consumers should now make the following chained call:
This PR utilises Polly's cache policy and the Microsoft MemoryCache to store the access token until it expires. The TTL on the cache item is determined from the Access Token response.
The Access Token cache is invoked at the top level of the decorator chain, and access token requests use all underlying decorators. In order to create a
WaivesClient
, consumers should now make the following chained call:Note that omitting the
Login()
call will result in aWaivesClient
that can be used against an API deployment with no authentication.Fixes #10.