MdocCredential

An mdoc credential, according to ISO/IEC 18013-5:2021.

In this type, the key in SecureAreaBoundCredential plays the role of DeviceKey and the issuer-signed data includes the Mobile Security Object which includes the authentication key and is signed by the issuer. This is used for anti-cloning and to return data signed by the device.

The issuerProvidedData for a MdocCredential must be the bytes of IssuerSigned according to ISO/IEC 18013-5:2021:

IssuerSigned = {
? "nameSpaces" : IssuerNameSpaces,
"issuerAuth" : IssuerAuth
}

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
lateinit var docType: String

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

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

The issuer-provided data associated with the credential.

Link copied to clipboard
lateinit var secureArea: SecureArea

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

Link copied to clipboard

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

Link copied to clipboard
val validFrom: Instant

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

Link copied to clipboard
val validUntil: Instant

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 override fun certify(issuerProvidedAuthenticationData: ByteArray, validFrom: Instant, validUntil: Instant)

Certifies the credential.

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

Initialize this object using serialized data.

Link copied to clipboard

The attestation for the SecureArea key associated with this credential.

Link copied to clipboard
open override fun getClaims(documentTypeRepository: DocumentTypeRepository?): List<MdocClaim>

Gets the claims in the 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
suspend fun replacementForDeleted()