KeyBoundSdJwtVcCredential

A SD-JWT VC credential, according to draft-ietf-oauth-sd-jwt-vc-03 (https://datatracker.ietf.org/doc/draft-ietf-oauth-sd-jwt-vc/) that is bound to a key stored in a SecureArea.

Constructors

Link copied to clipboard
constructor(document: Document)

Constructs a Credential from serialized data.

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
lateinit var alias: String

The alias for the authentication key associated with this credential.

Link copied to clipboard
open override val credentialType: String

Identifies credential type.

Link copied to clipboard

The Document that the credential belongs to.

Link copied to clipboard
lateinit var domain: String

The domain of the credential.

Link copied to clipboard
Link copied to clipboard

Indicates whether the credential has been certified yet.

Link copied to clipboard
val issuerProvidedData: ByteString

The issuer-provided data associated with the credential.

Link copied to clipboard
open lateinit override var otherVcts: List<String>

Other Verifiable Credential Types (VCTs) that can be used for matching in addition to vct.

Link copied to clipboard
lateinit var secureArea: SecureArea

The secure area for the authentication key associated with this credential.

Link copied to clipboard
val tags: Tags

A Tags for storing application-specific data.

Link copied to clipboard

How many times the credential has been used in an identity presentation.

Link copied to clipboard

The point in time the issuer-provided data is valid from.

Link copied to clipboard

The point in time the issuer-provided data is valid until.

Link copied to clipboard
open lateinit override var vct: String

The Verifiable Credential Type - or vct - as defined in section 3.2.2.1.1 of draft-ietf-oauth-sd-jwt-vc-03 (https://datatracker.ietf.org/doc/draft-ietf-oauth-sd-jwt-vc/)

Functions

Link copied to clipboard
open override fun addSerializedData(builder: MapBuilder<CborBuilder>)

Method which can be overridden by Credential subclasses to add any additional information when serializing a credential.

Link copied to clipboard
suspend fun addToDocument()
Link copied to clipboard
open suspend fun certify(issuerProvidedAuthenticationData: ByteString)

Certifies the credential.

Link copied to clipboard
protected open suspend override fun clear()

Cleans up additional credential data, such as a SecureArea key.

Link copied to clipboard
open suspend override fun deserialize(dataItem: DataItem)

Initialize this object using serialized data.

Link copied to clipboard
open suspend override fun exportToMpzPass(keyUnlockData: KeyUnlockData?): MpzPass

Exports the credential as a MpzPass which can be shared with other applications.

Link copied to clipboard
protected open suspend override fun extractValidityFromIssuerData(): Pair<Instant, Instant>

Extract validity from the issuer-provided data

Link copied to clipboard

Extracts validity from the credential

Link copied to clipboard
protected suspend fun generateKey(createKeySettings: CreateKeySettings)

Generates an authentication key to which this credential is bound and adds the credential to the document.

Link copied to clipboard

The attestation for the SecureArea key associated with this credential.

Link copied to clipboard
open suspend override fun getClaims(documentTypeRepository: DocumentTypeRepository?, locales: List<String>): List<JsonClaim>

Gets the claims in the credential.

Link copied to clipboard
open suspend fun getClaimsImpl(documentTypeRepository: DocumentTypeRepository?, locales: List<String> = emptyList()): List<JsonClaim>

Gets the top-level claims in the credential, see Credential.getClaims.

Link copied to clipboard
open suspend fun getIssuerCertChain(): X509CertChain?

The X.509 certificate chain for the issuer signature from the SD-JWT VC header (x5c), if present.

Link copied to clipboard

Convenience method to extract RevocationInfo from a Credential.

Link copied to clipboard
suspend fun increaseUsageCount()

Increases usage count of the credential.

Link copied to clipboard
open suspend override fun isInvalidated(): Boolean

Indicates whether the credential has been invalidated.

Link copied to clipboard
protected suspend fun useExistingKey(keyAlias: String)

Uses an existing authentication key to which this credential is bound and adds the credential to the document.

Link copied to clipboard
open suspend fun validate(now: Instant? = Clock.System.now()): ValidationResult

Validates this certified credential against its current issuerProvidedData.

open suspend override fun validate(issuerProvidedAuthenticationData: ByteString, now: Instant?): ValidationResult

Validates candidate issuer-provided static authentication data against this credential.

Link copied to clipboard
suspend fun SdJwtVcCredential.validate(now: Instant? = Clock.System.now()): ValidationResult

Validates this certified SD-JWT VC credential against its current issuer-provided data.

suspend fun SdJwtVcCredential.validate(issuerProvidedAuthenticationData: ByteString, now: Instant? = Clock.System.now()): ValidationResult

Validates candidate issuer-provided static authentication data against this SD-JWT VC credential.

Link copied to clipboard
open suspend fun validateSdJwtVc(issuerProvidedAuthenticationData: ByteString, now: Instant? = Clock.System.now()): ValidationResult

Validates candidate issuer-provided static authentication data against this SD-JWT VC credential according to RFC 9901 and the SD-JWT VC profile.