|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.microsoft.aad.adal.DefaultTokenCacheStore
public class DefaultTokenCacheStore
Store/Retrieve TokenCacheItem from private SharedPreferences. SharedPreferences saves items when it is committed in an atomic operation. One more retry is attempted in case there is a lock in commit.
| Constructor Summary | |
|---|---|
DefaultTokenCacheStore(android.content.Context context)
|
|
| Method Summary | |
|---|---|
void |
clearTokensForUser(String userid)
Clear tokens for user without additional retry. |
boolean |
contains(String key)
Checks if cache key exists. |
Iterator<TokenCacheItem> |
getAll()
User can query over iterator values. |
TokenCacheItem |
getItem(String key)
Get cache item. |
ArrayList<TokenCacheItem> |
getTokensAboutToExpire()
Get tokens about to expire. |
ArrayList<TokenCacheItem> |
getTokensForResource(String resource)
Tokens for resource. |
ArrayList<TokenCacheItem> |
getTokensForUser(String userid)
Get tokens for user. |
HashSet<String> |
getUniqueUsersWithTokenCache()
Unique users with tokens. |
void |
removeAll()
Removes all items from cache. |
void |
removeItem(String key)
Removes item with key. |
void |
setItem(String key,
TokenCacheItem item)
Sets item. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultTokenCacheStore(android.content.Context context)
throws NoSuchAlgorithmException,
NoSuchPaddingException
context - Context
NoSuchAlgorithmException
NoSuchPaddingException| Method Detail |
|---|
public TokenCacheItem getItem(String key)
ITokenCacheStore
getItem in interface ITokenCacheStorekey - CacheKey
public void removeItem(String key)
ITokenCacheStore
removeItem in interface ITokenCacheStorekey - CacheKey
public void setItem(String key,
TokenCacheItem item)
ITokenCacheStore
setItem in interface ITokenCacheStorekey - CacheKeyitem - Cache itempublic void removeAll()
ITokenCacheStore
removeAll in interface ITokenCacheStorepublic Iterator<TokenCacheItem> getAll()
getAll in interface ITokenStoreQuerypublic HashSet<String> getUniqueUsersWithTokenCache()
getUniqueUsersWithTokenCache in interface ITokenStoreQuerypublic ArrayList<TokenCacheItem> getTokensForResource(String resource)
getTokensForResource in interface ITokenStoreQueryresource - Resource identifier
TokenCacheItempublic ArrayList<TokenCacheItem> getTokensForUser(String userid)
getTokensForUser in interface ITokenStoreQueryuserid - Userid
TokenCacheItempublic void clearTokensForUser(String userid)
clearTokensForUser in interface ITokenStoreQueryuserid - UserIdpublic ArrayList<TokenCacheItem> getTokensAboutToExpire()
getTokensAboutToExpire in interface ITokenStoreQueryTokenCacheItempublic boolean contains(String key)
ITokenCacheStore
contains in interface ITokenCacheStorekey - CacheKey
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||