Caching Fixed Token Source
class CachingFixedTokenSource(source: FixedTokenSource, store: TokenStore, validator: TokenValidator) : BaseCachingTokenSource, FixedTokenSource
Functions
Link copied to clipboard
fun FixedTokenSource.cached(store: TokenStore = InMemoryTokenStore(), validator: TokenValidator = defaultValidator): CachingFixedTokenSource
Wraps the token store with a cache so that it reuses the token as long as it is valid.
Link copied to clipboard
Get the cached credentials if one exists.
Link copied to clipboard
Link copied to clipboard
Implement this to fetch the TokenSourceResponse from the token source.
Link copied to clipboard
Invalidate the cached credentials, forcing a fresh fetch on the next request.