Table of Contents

Class UnsafeTokenCacheOptions

Namespace
Azure.Identity
Assembly
Azure.Identity.dll

Options controlling the storage of the token cache.

public abstract class UnsafeTokenCacheOptions : TokenCachePersistenceOptions
Inheritance
UnsafeTokenCacheOptions
Inherited Members

Constructors

UnsafeTokenCacheOptions()

protected UnsafeTokenCacheOptions()

Methods

RefreshCacheAsync()

Returns the bytes used to initialize the token cache. This would most likely have come from the TokenCacheUpdatedArgs. This implementation will get called by the default implementation of RefreshCacheAsync(TokenCacheRefreshArgs, CancellationToken). It is recommended to provide an implementation for RefreshCacheAsync(TokenCacheRefreshArgs, CancellationToken) rather than this method.

protected abstract Task<ReadOnlyMemory<byte>> RefreshCacheAsync()

Returns

Task<ReadOnlyMemory<byte>>

RefreshCacheAsync(TokenCacheRefreshArgs, CancellationToken)

Returns the bytes used to initialize the token cache. This would most likely have come from the TokenCacheUpdatedArgs. It is recommended that if this method is overriden, there is no need to provide a duplicate implementation for the parameterless RefreshCacheAsync().

protected virtual Task<TokenCacheData> RefreshCacheAsync(TokenCacheRefreshArgs args, CancellationToken cancellationToken = default)

Parameters

args TokenCacheRefreshArgs

The TokenCacheRefreshArgs containing information about the current state of the cache.

cancellationToken CancellationToken

The CancellationToken controlling the lifetime of this operation.

Returns

Task<TokenCacheData>

TokenCacheUpdatedAsync(TokenCacheUpdatedArgs)

The delegate to be called when the Updated event fires.

protected abstract Task TokenCacheUpdatedAsync(TokenCacheUpdatedArgs tokenCacheUpdatedArgs)

Parameters

tokenCacheUpdatedArgs TokenCacheUpdatedArgs

Returns

Task