TokenProvider

fun interface TokenProvider

Provides a bearer token for Spotify Web API requests.

suspend, so wiring SpotifyAuthManager.getValidAccessToken into this interface yields automatic token refresh on the data path. Implement this interface to supply a custom token source. Pass an implementation to SpotifyClient or the domain *Apis classes. TokenHolder remains only as a deprecated compatibility shim.

Inheritors

Functions

Link copied to clipboard
abstract suspend fun provideToken(): String