CredentialProvider

Supplies runtime credentials to the SDK's authentication interceptors.

The SDK never stores or manages credentials itself. Implement this interface in your application and provide it via DI so that the interceptors can retrieve the current API user ID, API key, and access token on every request.

Implementations are responsible for storage (e.g. SharedPreferences, DataStore) and for any expiry logic.

Functions

Link copied to clipboard
abstract fun getAccessToken(): String

Returns the current Bearer access token, or an empty string if not available or expired.

Link copied to clipboard
abstract fun getApiKey(): String

Returns the API key used for Basic Authentication, or an empty string if not available.

Link copied to clipboard
abstract fun getApiUserId(): String

Returns the API user ID, or an empty string if not available.