SdJwtKb

class SdJwtKb(val compactSerialization: String)

A SD-JWT+KB according to draft-ietf-oauth-selective-disclosure-jwt.

When a SdJwtKb instance is initialized, cursory checks on the provided string with compact serialization are performed. Full verification of the SD-JWT+KB can be done using the verify method.

A wallet can create an instance of this class by using one of the SdJwt.present methods and can then send compactSerialization to a verifier via e.g. OpenID4VP.

This class is immutable.

Parameters

compactSerialization

the compact serialization of the SD-JWT+KB.

Throws

if the given compact serialization is malformed.

Constructors

Link copied to clipboard
constructor(compactSerialization: String)

Properties

Link copied to clipboard
Link copied to clipboard
lateinit var sdJwt: SdJwt

The SD-JWT part of the SD-JWT+KB

Functions

Link copied to clipboard
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