TokenCache Class
- java.
lang. Object - com.
microsoft. aad. msal4j. TokenCache
- com.
Implements
public class TokenCache
implements ITokenCache
Cache used for storing tokens. For more details, see https://aka.ms/msal4j-token-cache
Conditionally thread-safe
Field Summary
Modifier and Type | Field and Description |
---|---|
protected static final int | MIN_ACCESS_TOKEN_EXPIRE_IN_SEC |
Constructor Summary
Constructor | Description |
---|---|
TokenCache() |
Constructor for token cache |
TokenCache(ITokenCacheAccessAspect tokenCacheAccessAspect) |
Constructor for token cache |
Method Summary
Modifier and Type | Method and Description |
---|---|
void |
deserialize(String data)
Deserialize token cache from json |
java.lang.String |
serialize()
Serialize token cache to json |
Methods inherited from java.lang.Object
java.lang.Object.clone
java.lang.Object.equals
java.lang.Object.finalize
java.lang.Object.getClass
java.lang.Object.hashCode
java.lang.Object.notify
java.lang.Object.notifyAll
java.lang.Object.toString
java.lang.Object.wait
java.lang.Object.wait
java.lang.Object.wait
Field Details
MIN_ACCESS_TOKEN_EXPIRE_IN_SEC
protected static final int MIN_ACCESS_TOKEN_EXPIRE_IN_SEC
Constructor Details
TokenCache
public TokenCache()
Constructor for token cache
TokenCache
public TokenCache(ITokenCacheAccessAspect tokenCacheAccessAspect)
Constructor for token cache
Parameters:
tokenCacheAccessAspect
- ITokenCacheAccessAspect
Method Details
deserialize
public void deserialize(String data)
Deserialize token cache from json
Parameters:
data
serialize
public String serialize()
Serialize token cache to json