DrmTokenProvider

fun interface DrmTokenProvider

Supplies a DRM license token. Called on every license request — including renewals — so implementations must return a currently valid token each time (fetch it, refresh auth, etc.). Never cache a token beyond its lifetime; the SDK never caches it at all.

Invoked on a background thread with an 8s timeout and retries.

The timeout works through coroutine cancellation: implementations must be cancellable (suspending I/O such as OkHttp's await is; a raw blocking call inside the suspend function is not, and would hold the license request past the fence until it returns on its own).

Functions

Link copied to clipboard
abstract suspend fun getToken(request: DrmTokenRequest): String