TokenCredentialManager
Java-friendly token credential manager for JVM applications.
Provides blocking CRUD operations for credentials, wrapping the cross-platform KmpCredentialManager with AuthFoundationResult for Java interop.
Warning: All public methods use runBlocking internally. Do not call them from a coroutine or a thread that is part of a coroutine dispatcher — this will deadlock. For coroutine-based callers, use KmpCredentialManager directly.
Event listeners can be registered via addEventListener to receive credential lifecycle events.
Parameters
The OAuth2Client used for token operations.
The TokenStorage for persisting tokens.
Store for the default credential ID.
Functions
Registers a listener that is notified whenever a credential lifecycle event occurs.
Returns all stored credential IDs.
Deletes a credential by ID.
Retrieves a credential by its ID.
Returns the default credential, or null if no default has been set.
Returns metadata for the credential with the specified ID.
Sets the default credential.
Stores a new credential with the given token data and optional tags.