fromCwt
suspend fun fromCwt(cwt: ByteArray, publicKey: EcPublicKey? = null, checks: Map<WebTokenCheck, String> = mapOf(), atTime: Instant = Clock.System.now(), maxValidity: Duration = 365.days): IdentifierList
Parses and validates CWT that holds the identifier 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 IdentifierList
Parameters
cwt
identifier list CWT representation
publicKey
public key of the issuance server signing key (optional)
checks
additional checks for JWT validation
atTime
time instant to check for expiration
maxValidity
maximum CWT validity duration to accept
Throws
when cwt cannot be parsed as CWT identifier list
when CWT validation fails