Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 30 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,31 +16,16 @@ Use data provided by EU Wallets as a W3C VC, SD-JWT (prior to ARF 1.8.0), or ISO

Be sure to call `at.asitplus.wallet.eupid.Initializer.initWithVCK()` first thing in your application.

See [ARF PID Rulebook](https://github.com/eu-digital-identity-wallet/eudi-doc-architecture-and-reference-framework/blob/main/docs/annexes/annex-3/annex-3.01-pid-rulebook.md) for a list of attributes.
See [PID Rulebook](https://github.com/eu-digital-identity-wallet/eudi-doc-attestation-rulebooks-catalog/blob/main/rulebooks/pid/pid-rulebook.md)
from 2025-10-02 for a list of attributes.

These are implemented for ISO:
- `family_name`
- `given_name`
- `birth_date`
- `age_over_12`
- `age_over_13`
- `age_over_14`
- `age_over_16`
- `age_over_18`
- `age_over_21`
- `age_over_25`
- `age_over_60`
- `age_over_62`
- `age_over_65`
- `age_over_68`
- `age_in_years`
- `age_birth_year`
- `family_name_birth`
- `given_name_birth`
- `birth_place`
- `birth_country` (removed in ARF 1.5.0)
- `birth_state` (removed in ARF 1.5.0)
- `birth_city` (removed in ARF 1.5.0)
- `place_of_birth`
- `resident_address`
- `resident_country`
- `resident_state`
Expand All @@ -54,19 +39,44 @@ These are implemented for ISO:
- `expiry_date`
- `issuing_authority`
- `document_number`
- `administrative_number` (removed in ARF 1.5.0)
- `issuing_country`
- `issuing_jurisdiction`
- `personal_administrative_number`
- `portrait`
- `portrait_capture_date`
- `email_address`
- `mobile_phone_number`
- `trust_anchor`
- `location_status`

These attributes are removed from the spec, but kept for backwards compatibility with our implementations:
- `age_over_12`
- `age_over_13`
- `age_over_14`
- `age_over_16`
- `age_over_18`
- `age_over_21`
- `age_over_25`
- `age_over_60`
- `age_over_62`
- `age_over_65`
- `age_over_68`
- `age_in_years`
- `age_birth_year`
- `birth_place`
- `birth_country`
- `birth_state`
- `birth_city`
- `administrative_number`
- `portrait_capture_date`

## Changelog

Release 3.3.0:
- VC-K 5.9.0
- Kotlin 2.2.21
- Deprecate age attributes removed from the latest PID rulebook on 2025-10-02
- Remove SD-JWT attribute names

Release 3.2.0:
- VC-K 5.8.0
- Kotlin 2.2.0
Expand Down
7 changes: 2 additions & 5 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
plugins {
val kotlinVer = System.getenv("KOTLIN_VERSION_ENV")?.ifBlank { null } ?: libs.versions.kotlin.get()
val kotestVer = System.getenv("KOTEST_VERSION_ENV")?.ifBlank { null } ?: libs.versions.kotest.get()
val kspVer = System.getenv("KSP_VERSION_ENV")?.ifBlank { null } ?: "$kotlinVer-${libs.versions.ksp.get()}"

id("at.asitplus.gradle.conventions") version "20250728"
id("io.kotest") version kotestVer
id("at.asitplus.gradle.conventions") version "20251023"
id("de.infix.testBalloon") version libs.versions.testballoon.get() apply false
kotlin("multiplatform") version kotlinVer apply false
kotlin("plugin.serialization") version kotlinVer apply false
id("com.google.devtools.ksp") version kspVer
}

val artifactVersion: String by extra
Expand Down
1 change: 1 addition & 0 deletions eupidcredential/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ plugins {
id("at.asitplus.gradle.conventions")
id("org.jetbrains.dokka")
id("signing")
id("de.infix.testBalloon")
}

/* required for maven publication */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ import kotlinx.serialization.json.jsonPrimitive


/**
* PID according to [EU PID Rule Book, v1.5.0 from February 2025](https://github.com/eu-digital-identity-wallet/eudi-doc-architecture-and-reference-framework/blob/main/docs/annexes/annex-3/annex-3.01-pid-rulebook.md)
* PID scheme according to
* [PID Rulebook](https://github.com/eu-digital-identity-wallet/eudi-doc-attestation-rulebooks-catalog/blob/main/rulebooks/pid/pid-rulebook.md)
* from 2025-10-02.
*/
@Serializable
@SerialName("EuPid2023")
Expand All @@ -36,54 +38,67 @@ data class EuPidCredential(
@Serializable(with = LocalDateIso8601Serializer::class)
val birthDate: LocalDate,

@Deprecated("Removed from PID rulebook")
/** Additional current age attestations: Attesting whether the PID User is currently over 12 years old. */
@SerialName(Attributes.AGE_OVER_12)
val ageOver12: Boolean? = null,

@Deprecated("Removed from PID rulebook")
/** Additional current age attestations: Attesting whether the PID User is currently over 13 years old. */
@SerialName(Attributes.AGE_OVER_13)
val ageOver13: Boolean? = null,

@Deprecated("Removed from PID rulebook")
/** Additional current age attestations: Attesting whether the PID User is currently over 14 years old. */
@SerialName(Attributes.AGE_OVER_14)
val ageOver14: Boolean? = null,

@Deprecated("Removed from PID rulebook")
/** Additional current age attestations: Attesting whether the PID User is currently over 16 years old. */
@SerialName(Attributes.AGE_OVER_16)
val ageOver16: Boolean? = null,

@Deprecated("Removed from PID rulebook")
/** Attesting whether the User to whom the person identification data relates is currently an adult (true) or a minor (false). */
@SerialName(Attributes.AGE_OVER_18)
val ageOver18: Boolean? = null,

@Deprecated("Removed from PID rulebook")
/** Additional current age attestations: Attesting whether the PID User is currently over 21 years old. */
@SerialName(Attributes.AGE_OVER_21)
val ageOver21: Boolean? = null,

@Deprecated("Removed from PID rulebook")
/** Additional current age attestations: Attesting whether the PID User is currently over 25 years old. */
@SerialName(Attributes.AGE_OVER_25)
val ageOver25: Boolean? = null,

@Deprecated("Removed from PID rulebook")
/** Additional current age attestations: Attesting whether the PID User is currently over 60 years old. */
@SerialName(Attributes.AGE_OVER_60)
val ageOver60: Boolean? = null,

@Deprecated("Removed from PID rulebook")
/** Additional current age attestations: Attesting whether the PID User is currently over 62 years old. */
@SerialName(Attributes.AGE_OVER_62)
val ageOver62: Boolean? = null,

@Deprecated("Removed from PID rulebook")
/** Additional current age attestations: Attesting whether the PID User is currently over 65 years old. */
@SerialName(Attributes.AGE_OVER_65)
val ageOver65: Boolean? = null,

@Deprecated("Removed from PID rulebook")
/** Additional current age attestations: Attesting whether the PID User is currently over 68 years old. */
@SerialName(Attributes.AGE_OVER_68)
val ageOver68: Boolean? = null,

@Deprecated("Removed from PID rulebook")
/** The current age of the User to whom the person identification data relates in years. */
@SerialName(Attributes.AGE_IN_YEARS)
val ageInYears: UInt? = null,

@Deprecated("Removed from PID rulebook")
/** The year when the User to whom the person identification data relates was born. */
@SerialName(Attributes.AGE_BIRTH_YEAR)
val ageBirthYear: UInt? = null,
Expand All @@ -96,12 +111,14 @@ data class EuPidCredential(
@SerialName(Attributes.GIVEN_NAME_BIRTH)
val givenNameBirth: String? = null,

/** The country as an alpha-2 country code as specified in ISO 3166-1, or the state, province, district, or local
* area or the municipality, city, town, or village where the user to whom the person identification data relates
* was born. */
@Deprecated("Removed from PID rulebook", ReplaceWith("placeOfBirth"))
@SerialName(Attributes.BIRTH_PLACE)
val birthPlace: String? = null,

/** See [PlaceOfBirth]. At least one of the values shall be present. */
@SerialName(Attributes.PLACE_OF_BIRTH)
val placeOfBirth: PlaceOfBirth? = null,

/** The country where the PID User was born, as an Alpha-2 country code as specified in ISO 3166-1. */
@Suppress("DEPRECATION")
@Deprecated("Removed in ARF 1.5.0")
Expand Down Expand Up @@ -400,4 +417,18 @@ data class EuPidCredential(

}

/** At least one of the values shall be present. */
@Serializable
data class PlaceOfBirth(
/** The country where the PID User was born, as an Alpha-2 country code as specified in ISO 3166-1. */
@SerialName(Attributes.PlaceOfBirth.COUNTRY)
val country: String? = null,

/** The state, province, district, or local area where the PID User was born. */
@SerialName(Attributes.PlaceOfBirth.REGION)
val region: String? = null,

/** The municipality, city, town, or village where the PID User was born. */
@SerialName(Attributes.PlaceOfBirth.LOCALITY)
val locality: String? = null,
)
Loading