Skip to content

Commit b91100b

Browse files
add wiring for verifier_info (#1767)
* add wiring for verifier_info * fix iso pid example * Update waltid-libraries/protocols/waltid-openid4vp-verifier/src/commonMain/kotlin/id/walt/verifier2/data/VerificationSessionSetupData.kt Co-authored-by: szijpeter <szijpeter@gmail.com> * rename PID example for clarity * fix comment --------- Co-authored-by: szijpeter <szijpeter@gmail.com>
1 parent ea12ec5 commit b91100b

4 files changed

Lines changed: 24 additions & 21 deletions

File tree

waltid-libraries/credentials/waltid-dcql/src/commonMain/kotlin/id/walt/dcql/models/DcqlQuery.kt

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -116,27 +116,27 @@ data class DcqlQuery(
116116
)
117117
)
118118

119-
val EXAMPLE_ISO_PID = DcqlQuery(
119+
val EXAMPLE_EUDI_PID = DcqlQuery(
120120
credentials = listOf(
121121
CredentialQuery(
122122
id = "pid",
123123
format = CredentialFormat.MSO_MDOC,
124124
meta = MsoMdocMeta("eu.europa.ec.eudi.pid.1"),
125125
claims = listOf(
126-
ClaimsQuery(pathStrings = listOf("org.iso.18013.5.1", "family_name")),
127-
ClaimsQuery(pathStrings = listOf("org.iso.18013.5.1", "given_name")),
128-
ClaimsQuery(pathStrings = listOf("org.iso.18013.5.1", "birth_date")),
129-
ClaimsQuery(pathStrings = listOf("org.iso.18013.5.1", "age_birth_year")),
130-
ClaimsQuery(pathStrings = listOf("org.iso.18013.5.1", "age_over_18")),
131-
ClaimsQuery(pathStrings = listOf("org.iso.18013.5.1", "age_over_21")),
132-
ClaimsQuery(pathStrings = listOf("org.iso.18013.5.1", "family_name_birth")),
133-
ClaimsQuery(pathStrings = listOf("org.iso.18013.5.1", "given_name_birth")),
134-
ClaimsQuery(pathStrings = listOf("org.iso.18013.5.1", "birth_place")),
135-
ClaimsQuery(pathStrings = listOf("org.iso.18013.5.1", "birth_country")),
136-
ClaimsQuery(pathStrings = listOf("org.iso.18013.5.1", "issuance_date")),
137-
ClaimsQuery(pathStrings = listOf("org.iso.18013.5.1", "expiry_date")),
138-
ClaimsQuery(pathStrings = listOf("org.iso.18013.5.1", "issuing_authority")),
139-
ClaimsQuery(pathStrings = listOf("org.iso.18013.5.1", "issuing_country")),
126+
ClaimsQuery(pathStrings = listOf("eu.europa.ec.eudi.pid.1", "family_name")),
127+
ClaimsQuery(pathStrings = listOf("eu.europa.ec.eudi.pid.1", "given_name")),
128+
ClaimsQuery(pathStrings = listOf("eu.europa.ec.eudi.pid.1", "birth_date")),
129+
ClaimsQuery(pathStrings = listOf("eu.europa.ec.eudi.pid.1", "age_birth_year")),
130+
ClaimsQuery(pathStrings = listOf("eu.europa.ec.eudi.pid.1", "age_over_18")),
131+
ClaimsQuery(pathStrings = listOf("eu.europa.ec.eudi.pid.1", "age_over_21")),
132+
ClaimsQuery(pathStrings = listOf("eu.europa.ec.eudi.pid.1", "family_name_birth")),
133+
ClaimsQuery(pathStrings = listOf("eu.europa.ec.eudi.pid.1", "given_name_birth")),
134+
ClaimsQuery(pathStrings = listOf("eu.europa.ec.eudi.pid.1", "birth_place")),
135+
ClaimsQuery(pathStrings = listOf("eu.europa.ec.eudi.pid.1", "birth_country")),
136+
ClaimsQuery(pathStrings = listOf("eu.europa.ec.eudi.pid.1", "issuance_date")),
137+
ClaimsQuery(pathStrings = listOf("eu.europa.ec.eudi.pid.1", "expiry_date")),
138+
ClaimsQuery(pathStrings = listOf("eu.europa.ec.eudi.pid.1", "issuing_authority")),
139+
ClaimsQuery(pathStrings = listOf("eu.europa.ec.eudi.pid.1", "issuing_country")),
140140
)
141141
)
142142
)

waltid-libraries/protocols/waltid-openid4vp-verifier-openapi/src/main/kotlin/id/walt/verifier2/openapi/VerificationSessionCreateOpenApi.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ object VerificationSessionCreateOpenApi {
9898
// ISO Examples
9999

100100
example("[openid4vp-http][sd-jwt pid]") { value = CrossDeviceFlowSetup.EXAMPLE_SDJWT_PID }
101-
example("[openid4vp-http][iso pid]") { value = CrossDeviceFlowSetup.EXAMPLE_ISO_PID }
101+
example("[openid4vp-http][iso pid]") { value = CrossDeviceFlowSetup.EXAMPLE_EUDI_PID }
102102
example("[openid4vp-http][iso mdl & photo-id]") { value = CrossDeviceFlowSetup.EXAMPLE_MDL_OR_PHOTOID }
103103
example("[openid4vp-http][iso mdl] credential status for TokenStatusList") {
104104
value = Verifier2OpenApiExamples.openid4vpHttpMdocCredentialStatusTokenStatusList

waltid-libraries/protocols/waltid-openid4vp-verifier/src/commonMain/kotlin/id/walt/verifier2/data/VerificationSessionSetupData.kt

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import id.walt.dcql.models.meta.MsoMdocMeta
1212
import id.walt.dcql.models.meta.NoMeta
1313
import id.walt.ktornotifications.core.KtorSessionNotifications
1414
import id.walt.verifier.openid.models.authorization.ClientMetadata
15+
import id.walt.verifier.openid.models.authorization.VerifierInfoItem
1516
import id.walt.verifier2.data.Verification2Session.DefinedVerificationPolicies
1617
import id.walt.verifier2.utils.UrlUtils
1718
import kotlinx.serialization.ExperimentalSerializationApi
@@ -51,7 +52,9 @@ data class GeneralFlowConfig(
5152
/** request signing key */
5253
val key: DirectSerializedKey? = null,
5354
/** certificate chain for signed request */
54-
val x5c: List<String>? = null
55+
val x5c: List<String>? = null,
56+
57+
@SerialName("verifier_info") val verifierInfo: List<VerifierInfoItem>? = null
5558
) {
5659
init {
5760
// Verify if DCQL Query is correct
@@ -132,9 +135,9 @@ data class CrossDeviceFlowSetup(
132135
)
133136
)
134137

135-
val EXAMPLE_ISO_PID: VerificationSessionSetup = BASE_EXAMPLE.copy(
138+
val EXAMPLE_EUDI_PID: VerificationSessionSetup = BASE_EXAMPLE.copy(
136139
core = BASE_EXAMPLE.core.copy(
137-
dcqlQuery = DcqlQuery.DcqlQueryExamples.EXAMPLE_ISO_PID
140+
dcqlQuery = DcqlQuery.DcqlQueryExamples.EXAMPLE_EUDI_PID
138141
)
139142
)
140143
}

waltid-libraries/protocols/waltid-openid4vp-verifier/src/jvmMain/kotlin/id/walt/verifier2/handlers/sessioncreation/VerificationSessionCreator.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,9 +237,9 @@ object VerificationSessionCreator {
237237

238238
/*
239239
* OPTIONAL. An array of attestations about the Verifier relevant to the Credential Request.
240-
* Each object structure is represented by [VerifierAttestationItem].
240+
* Each object structure is represented by [VerifierInfoItem].
241241
*/
242-
//val verifierAttestations: List<VerifierAttestationItem>? = null,
242+
verifierInfo = setup.core.verifierInfo,
243243

244244
// SIOPv2 specific parameters (if scope includes "openid") - common but technically from SIOPv2
245245
/*

0 commit comments

Comments
 (0)