Interface TokenStore
- All Known Implementing Classes:
TokenStore.DefaultStorageTokenStore
public interface TokenStore
Pluggable persistence for an OidcClient's tokens. Implement this and pass
to OidcClient.setTokenStore(TokenStore) when you want a custom strategy
(e.g. cross-device sync, encrypted-at-rest with your own key, in-memory
only). The default is TokenStore.DefaultStorageTokenStore, which serialises tokens
to the standard Storage under a per-issuer key. For biometric-gated
persistence on iOS / Android, use
invalid reference
SecureStorageTokenStore
All methods are asynchronous and may run network or biometric prompts on the calling thread.
- Since:
- 7.0.245
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classThe default store. -
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.
-
Method Details
-
load
Reads previously-saved tokens forkey, or completes withnullif nothing is stored. -
save
Persiststokensunderkey. Implementations should overwrite any existing entry atomically. -
clear
Removes the entry forkey. Completing withBoolean.FALSEmeans nothing was stored; completing with an error means the underlying store failed.
-