addAttribute

fun addAttribute(type: DocumentAttributeType, identifier: String, displayName: String, description: String, mandatory: Boolean, mdocNamespace: String, icon: Icon? = null, sampleValueMdoc: DataItem? = null, sampleValueJson: JsonElement? = null): DocumentType.Builder

Add an attribute for both ISO mdoc and JSON-based document, using the same identifier.

Parameters

type

the datatype of this attribute.

identifier

the identifier of this attribute for both ISO mdoc and JSON-based credentials.

displayName

a name suitable for display of the attribute.

description

a description of the attribute.

mandatory

indication whether the ISO mdoc attribute is mandatory.

mdocNamespace

the namespace of the ISO mdoc attribute.

icon

the icon, if available.

sampleValueMdoc

a sample value for the attribute for ISO mdoc credentials, if available.

sampleValueJson

a sample value for the attribute for JSON-based credentials, if available.


fun addAttribute(type: DocumentAttributeType, mdocIdentifier: String, jsonIdentifier: String, displayName: String, description: String, mandatory: Boolean, mdocNamespace: String, icon: Icon? = null, sampleValueMdoc: DataItem? = null, sampleValueJson: JsonElement? = null): DocumentType.Builder

Add an attribute for both ISO mdoc and JSON-based, using a different identifier.

Parameters

type

the datatype of this attribute.

mdocIdentifier

the identifier of this attribute for ISO mdoc credentials, e.g. age_over_18.

jsonIdentifier

the identifier of this attribute for JSON-based credentials using . to separate path components, e.g. age_equal_or_over.18.

displayName

a name suitable for display of the attribute.

description

a description of the attribute.

mandatory

indication whether the ISO mdoc attribute is mandatory.

mdocNamespace

the namespace of the ISO mdoc attribute.

icon

the icon, if available.

sampleValueMdoc

a sample value for the attribute for ISO mdoc credentials, if available.

sampleValueJson

a sample value for the attribute for JSON-based credentials, if available.