Open vpilkevych-ddy opened 2 days ago
Please take a look at one of the ValidatedSiopOpenId4VPRequest.createVpToken() functions.
ValidatedSiopOpenId4VPRequest.createVpToken()
https://github.com/eu-digital-identity-wallet/eudi-lib-ios-siop-openid4vp-swift/blob/main/Sources/Entities/Validated/ValidatedSiopOpenId4VPRequest.swift#L455
Because of the try keyword this fails in case if the scheme is absent. According to the specification client_id_scheme is optional.
try
client_id_scheme
https://openid.net/specs/openid-4-verifiable-presentations-1_0-18.html#section-5-8.6
If it's a deliberate design choice, maybe then the scheme validation doesn't have to be so strict here:
https://github.com/eu-digital-identity-wallet/eudi-lib-ios-siop-openid4vp-swift/blob/main/Sources/Entities/ClientMetaData/ClientIdScheme.swift#L41
For example, the DID scheme is in the enum, it is in the supported scheme enum, but still is not considered as valid, although the library doesn't need to do anything specific in such case, it is wallet's responsibility.
Thank you very much for opening this issue @vpilkevych-ddy! I'll assign it to myself to resolve it.
Please take a look at one of the
ValidatedSiopOpenId4VPRequest.createVpToken()
functions.https://github.com/eu-digital-identity-wallet/eudi-lib-ios-siop-openid4vp-swift/blob/main/Sources/Entities/Validated/ValidatedSiopOpenId4VPRequest.swift#L455
Because of the
try
keyword this fails in case if the scheme is absent. According to the specificationclient_id_scheme
is optional.https://openid.net/specs/openid-4-verifiable-presentations-1_0-18.html#section-5-8.6
If it's a deliberate design choice, maybe then the scheme validation doesn't have to be so strict here:
https://github.com/eu-digital-identity-wallet/eudi-lib-ios-siop-openid4vp-swift/blob/main/Sources/Entities/ClientMetaData/ClientIdScheme.swift#L41
For example, the DID scheme is in the enum, it is in the supported scheme enum, but still is not considered as valid, although the library doesn't need to do anything specific in such case, it is wallet's responsibility.