ITokenCacheStore Interface

public interface ITokenCacheStore

Minimal interface needed by ADAL for cache.

Method Summary

Modifier and Type Method and Description
boolean contains(String key)

Checks if cache key exists.

Iterator<TokenCacheItem> getAll()

Get all cached token items.

TokenCacheItem getItem(String key)

Get cache item.

void removeAll()

Removes all items from cache.

void removeItem(String key)

Removes item with key.

void setItem(String key, TokenCacheItem item)

Sets item.

Method Details

contains

public boolean contains(String key)

Checks if cache key exists.

Parameters:

key -

CacheKey

Returns:

true if it exists

getAll

public Iterator getAll()

Get all cached token items.

Returns:

Iterator of TokenCacheItems in the cache.

getItem

public TokenCacheItem getItem(String key)

Get cache item.

Parameters:

key -

CacheKey

Returns:

Token cache item

removeAll

public void removeAll()

Removes all items from cache.

removeItem

public void removeItem(String key)

Removes item with key.

Parameters:

key -

CacheKey

setItem

public void setItem(String key, TokenCacheItem item)

Sets item.

Parameters:

key -

CacheKey

item - Cache item

Applies to