C# Класс Microsoft.Identity.Client.TokenCache

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
Clear ( string clientId ) : void

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 PublicClientApplication which share that cache.

Deserialize ( byte state ) : void

Deserializes state of the cache. The state should be the blob received earlier by calling the method Serialize.

ReadItems ( string clientId ) : IEnumerable

Reads a copy of the list of all items in the cache.

Serialize ( ) : byte[]

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.

TokenCache ( byte state ) : System

Constructor receiving state of the cache

Приватные методы

Метод Описание
CreateResultExFromCacheResultEx ( TokenCacheKey key, AuthenticationResultEx resultEx ) : AuthenticationResultEx
DeleteItem ( TokenCacheItem item ) : void

Deletes an item from the cache.

DeleteItemFromCache ( TokenCacheItem item ) : void
GetHomeObjectIdsFromCache ( string clientId ) : IEnumerable
GetUniqueIdsFromCache ( string clientId ) : IEnumerable
GetUsers ( string clientId ) : IEnumerable
LoadFromCache ( string authority, HashSet scope, string clientId, User user, string policy, CallState callState ) : AuthenticationResultEx
LoadSingleItemFromCache ( string authority, HashSet scope, string clientId, User user, string policy, CallState callState ) : AuthenticationResultEx>?.KeyValuePair
OnAfterAccess ( TokenCacheNotificationArgs args ) : void
OnBeforeAccess ( TokenCacheNotificationArgs args ) : void
OnBeforeWrite ( TokenCacheNotificationArgs args ) : void
QueryCache ( string authority, string clientId, User user, string policy ) : AuthenticationResultEx>>.List
QueryCache ( string authority, string clientId, string uniqueId, string displayableId, string rootId, string policy ) : AuthenticationResultEx>>.List

Queries all values in the cache that meet the passed in values, plus the authority value that this AuthorizationContext was created with. In every case passing null results in a wildcard evaluation.

ReadItemsFromCache ( string clientId ) : List
StoreToCache ( AuthenticationResultEx resultEx, string authority, string clientId, string policy, bool restrictToSingleUser, CallState callState ) : void
TokenCache ( ) : System
UpdateCachedRefreshTokens ( AuthenticationResultEx result, string authority, string clientId, string policy ) : void

Описание методов

Clear() публичный Метод

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 PublicClientApplication which share that cache.
public Clear ( string clientId ) : void
clientId string
Результат void

Deserialize() публичный Метод

Deserializes state of the cache. The state should be the blob received earlier by calling the method Serialize.
public Deserialize ( byte state ) : void
state byte State of the cache as a blob
Результат void

ReadItems() публичный Метод

Reads a copy of the list of all items in the cache.
public ReadItems ( string clientId ) : IEnumerable
clientId string
Результат IEnumerable

Serialize() публичный Метод

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.
public Serialize ( ) : byte[]
Результат byte[]

TokenCache() публичный Метод

Constructor receiving state of the cache
public TokenCache ( byte state ) : System
state byte
Результат System