verify

fun verify(issuerKey: EcPublicKey, checkNonce: (nonce: String) -> Boolean, checkAudience: (audience: String) -> Boolean, checkCreationTime: (creationTime: Instant) -> Boolean): JsonObject

Verifies a SD-JWT+KB according to Section 7.3 of the SD-JWT specification

Return

the processed SD-JWT payload,

Parameters

issuerKey

the issuer's key to use for verification.

checkNonce

a function to check that the nonce in the KB JWT is as expected.

checkAudience

a function to check that the audience in the KB JWT is as expected.

checkCreationTime

a function to check that the creation time in the KB JWT is as expected.

Throws

if the issuer signature or key-binding signature failed to validate.