TokenCredentialManager
Cross-platform credential manager providing CRUD operations for credentials.
Holds the shared dependencies (client, storage, defaultIdStore) so callers don't need to pass them on every operation.
Credential lifecycle events are emitted on events. All active collectors receive every event independently. There is no replay; events emitted before a collector subscribes are not delivered.
Parameters
The OAuth2Client used for token operations.
The TokenStorage for persisting tokens.
Store for the default credential ID.
Optional callback invoked when a storage operation throws. Return true to retry the failed operation once; return false (or omit) to rethrow. The decision is based on the thrown Exception, for example:
onStorageError = { e -> e is android.database.sqlite.SQLiteException }Constructors
Functions
Returns all credentials matching the given where predicate.
Returns all credentials matching the given predicate.
Returns the default credential, or null if no default has been set.
Sets or clears the default credential.
Updates metadata for an existing credential.