retrieveLicense

abstract suspend fun retrieveLicense(asset: Asset, authentication: LcpAuthenticating, allowUserInteraction: Boolean): Try<LcpLicense, LcpError>

Opens the LCP license of a protected publication, to access its DRM metadata and decipher its content. If the updated license cannot be stored into the Asset, you'll get an exception if the license points to a LSD server that cannot be reached, for instance because no Internet gateway is available.

Updated licenses can currently be stored only into Assets whose source property points to a URL with scheme file or content.

Parameters

authentication

Used to retrieve the user passphrase if it is not already known. The request will be cancelled if no passphrase is found in the LCP passphrase storage and the provided authentication.

allowUserInteraction

Indicates whether the user can be prompted for their passphrase.