Package com.qtsurfer.api.sdk.auth
Interface TokenStore
- All Known Implementing Classes:
InMemoryTokenStore
public interface TokenStore
Pluggable token persistence strategy for
AuthenticatedClient.
The SDK ships an InMemoryTokenStore as the default. Adopters
implement this SAM to back tokens by an on-disk file, a secret manager,
etc. The SDK calls load() once at session start to seed any
previously cached token, save(AuthTokenResponse) after every
successful authenticate() / refresh, and clear() when the
session is explicitly invalidated.
Implementations are expected to be thread-safe.
-
Method Summary
-
Method Details
-
load
com.qtsurfer.api.client.model.AuthTokenResponse load()Return the persisted token, ornullif none. -
save
void save(com.qtsurfer.api.client.model.AuthTokenResponse token) Persist the token returned byPOST /v1/auth/token. -
clear
void clear()Drop any persisted token.
-