KeylessMdocCredential

A non-key-bound (keyless) ISO/IEC 18013-5 mdoc credential.

According to ISO/IEC 18013-5 Second Edition, a non-key-bound mdoc omits deviceKeyInfo in the MobileSecurityObject and omits deviceSigned in Document presentations, and may only satisfy a DocRequest when nonKeyBoundSupported is true (or DCQL require_cryptographic_holder_binding is false).

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
open override val credentialType: String

Identifies credential type.

Link copied to clipboard
open lateinit override var docType: String

The docType of the credential as defined in ISO/IEC 18013-5.

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
open override val issuerAuth: CoseSign1

The IssuerAuth part of the issuer-provided data.

Link copied to clipboard
open override val issuerCertChain: X509CertChain

Convenience property for accessing the X.509 certificate chain for the issuer signature from issuerAuth.

Link copied to clipboard

The issuer-signed data elements part of the issuer-provided data.

Link copied to clipboard
val issuerProvidedData: ByteString

The issuer-provided data associated with the credential.

Link copied to clipboard
open override val issuerSigned: DataItem

The IssuerSigned data according to ISO/IEC 18013-5.

Link copied to clipboard
open override val mso: MobileSecurityObject

Convenience property for accessing the MobileSecurityObject from issuerAuth.

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.

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 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
open suspend override fun getClaims(documentTypeRepository: DocumentTypeRepository?, locales: List<String>): List<MdocClaim>

Gets the claims in the credential.

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

Gets the claims in the credential, see Credential.getClaims.

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 fun isInvalidated(): Boolean

Indicates whether the credential has been invalidated.

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 MdocCredential.validate(now: Instant? = Clock.System.now()): ValidationResult

Validates this certified mdoc credential against its current issuer-provided data.

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

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