fromCwt
suspend fun fromCwt(cwt: ByteArray, publicKey: EcPublicKey? = null, checks: Map<WebTokenCheck, String> = mapOf(), maxValidity: Duration = 365.days): StatusList
Parses and validates CWT that holds the status list.
CWT signature can be validated either by passing WebTokenCheck.TRUST key in the checks map or using non-null publicKey (see validateCwt).
Return
parsed StatusList
Parameters
cwt
status list CWT representation
publicKey
public key of the issuance server signing key (optional)
checks
additional checks for JWT validation
maxValidity
maximum CWT validity duration to accept
Throws
when cwt cannot be parsed as CWT status list
when CWT validation fails