Class TokenStore.DefaultStorageTokenStore
java.lang.Object
com.codename1.io.oidc.TokenStore.DefaultStorageTokenStore
- All Implemented Interfaces:
TokenStore
- Enclosing interface:
TokenStore
The default store. Serialises the token JSON to
Storage under a
"cn1.oidc."-prefixed key. Convenient and zero-config, but not
encrypted-at-rest -- the underlying storage on Android is the app's
internal files directory, which is sandboxed but not protected against
a rooted device with backups enabled.- Since:
- 7.0.245
-
Nested Class Summary
Nested classes/interfaces inherited from interface TokenStore
TokenStore.DefaultStorageTokenStore -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionRemoves the entry forkey.Reads previously-saved tokens forkey, or completes withnullif nothing is stored.save(String key, OidcTokens tokens) Persiststokensunderkey.
-
Constructor Details
-
DefaultStorageTokenStore
public DefaultStorageTokenStore()
-
-
Method Details
-
load
Description copied from interface:TokenStoreReads previously-saved tokens forkey, or completes withnullif nothing is stored.- Specified by:
loadin interfaceTokenStore
-
save
Description copied from interface:TokenStorePersiststokensunderkey. Implementations should overwrite any existing entry atomically.- Specified by:
savein interfaceTokenStore
-
clear
Description copied from interface:TokenStoreRemoves the entry forkey. Completing withBoolean.FALSEmeans nothing was stored; completing with an error means the underlying store failed.- Specified by:
clearin interfaceTokenStore
-