public static final class TokenStore.DefaultStorageTokenStore
- Object
- TokenStore.DefaultStorageTokenStore
ImplementsTokenStore
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.Constructors
public DefaultStorageTokenStore() |
Methods
Inherited nested types
Inherited methods
Constructor details
DefaultStorageTokenStore
public DefaultStorageTokenStore()Method details
load
public AsyncResource<OidcTokens> load(String key)Reads previously-saved tokens for
key, or completes with null if
nothing is stored.save
public AsyncResource<Boolean> save(String key, OidcTokens tokens)Persists
tokens under key. Implementations should overwrite any
existing entry atomically.clear
public AsyncResource<Boolean> clear(String key)Removes the entry for
key. Completing with Boolean.FALSE means
nothing was stored; completing with an error means the underlying
store failed.