Token cache class used by AuthenticationContext to store access and refresh tokens.
public class TokenCache
Constructor receiving state of the cache
Notification method called after any library method accesses the cache.
Notification method called before any library method accesses the cache.
Notification method called before any library method writes to the cache. This notification can be used to reload the cache state from a row in database and lock that row. That database row can then be unlocked in AfterAccess notification.
Gets the nunmber of items in the cache.
Static token cache shared by all instances of AuthenticationContext which do not explicitly pass a cache instance during construction.
Gets or sets the flag indicating whether cache state has changed. ADAL methods set this flag after any change. Caller application should reset the flag after serializing and persisting the state of the cache.
Clears the cache by deleting all the items. Note that if the cache is the default shared cache, clearing it would impact all the instances of AuthenticationContext which share that cache.
Deletes an item from the cache.
Deserializes state of the cache. The state should be the blob received earlier by calling the method Serialize.
Reads a copy of the list of all items in the cache.
Serializes current state of the cache as a blob. Caller application can persist the blob and update the state of the cache later by passing that blob back in constructor or by calling method Deserialize.
Determines if a certain property is defined or not.
Determines if a certain property is null or not.
Determines if a certain property is of premitive JSON type.