Closed nickalbrecht closed 2 years ago
I misunderstood the code a little regarding the expiration. The AccessTokenItem.ExpiresIn
is just a plain old date object of when it's no longer valid. The expiration for the CacheEntry is still set separately, so theDistributedCacheEntryOptions
is still needed, but shouldn't it be using SetAbsoluteExpiration()
?
Was going through the WebMVCClient example and the auth token caching implementation, when I found that the
ApiTokenCacheClient
is offsetting the expiration by the number of seconds intokenResponse.ExpiresIn
and also setting a sliding expiration of 1 day on top of that. Conversely, theApiTokenInMemoryClient
is only offsetting by thetokenResponse.ExpiresIn
.Is the expiration not a fixed point in time after being offset by the
ExpiresIn
value? Does sliding expiration do anything in this case? I'm assuming the token will be considered expired after theExpiresIn
has lapsed?