-
public abstract class BaseCachingTokenSource
-
-
Constructor Summary
Constructors Constructor Description BaseCachingTokenSource(TokenStore store, Function2<TokenRequestOptions, TokenSourceResponse, Boolean> validator)
-
Method Summary
Modifier and Type Method Description abstract Result<TokenSourceResponse>fetchFromSource(TokenRequestOptions options)Implement this to fetch the TokenSourceResponse from the token source. final Unitinvalidate()Invalidate the cached credentials, forcing a fresh fetch on the next request. final TokenSourceResponsecachedResponse()Get the cached credentials if one exists. -
-
Constructor Detail
-
BaseCachingTokenSource
BaseCachingTokenSource(TokenStore store, Function2<TokenRequestOptions, TokenSourceResponse, Boolean> validator)
-
-
Method Detail
-
fetchFromSource
abstract Result<TokenSourceResponse> fetchFromSource(TokenRequestOptions options)
Implement this to fetch the TokenSourceResponse from the token source.
-
invalidate
final Unit invalidate()
Invalidate the cached credentials, forcing a fresh fetch on the next request.
-
cachedResponse
final TokenSourceResponse cachedResponse()
Get the cached credentials if one exists.
-
-
-
-