Closed OR13 closed 2 years ago
Use:
const credentialQuery = {
"web": {
"VerifiablePresentation": {
"query": [{
"type": "QueryByExample",
"credentialQuery": {
"reason": "Please present a UniversityDegreeCredential for JaneDoe.",
"example": {
"@context": [
"https://w3id.org/credentials/v1",
"https://www.w3.org/2018/credentials/examples/v1"
],
"type": ["UniversityDegreeCredential"],
"credentialSubject": {
"id": "did:example:ebfeb1f712ebc6f1c276e12ec21"
}
}
}
}]
},
"recommendedHandlerOrigins": [
"https://chapi-demo-wallet.digitalbazaar.com"
]
}
}
@tolson4 -- can you provide a really simple example, something that matches from chapi.io?
I'll tweak the above example and add it real quick. @tolson4, this is another area we'll want to make sure we're aligning / using chapi.io as best as possible here to avoid duplicate maintenance.
Why would anyone ever use:
recommendedHandlerOrigins
AFAIK, its undocumented here: https://w3c-ccg.github.io/vp-request-spec/
@OR13 so, recommendedHandlerOrigins
is super useful -- it supports the very common usecase of people /not/ having any wallets installed. So the Origins array provides some suggestions of - hey, if you don't have a wallet, here are some you might want to try.
(And yeah, it should be added to the VPR spec)
This has been updated: https://github.com/credential-handler/credential-handler-polyfill/blob/main/README.md#get
@OR13, @dmitrizagidulin,
"recommendedHandlerOrigins" is not part of VPR, it is part of a WebCredential
request (so part of the Credential Handler API / CHAPI instead).
I am removing it (recommendedHandlerOrigins
) in my demo, I don't see any documentation or reason to support it
imo it should be in the VPR spec... if its in a query... which it is.
Even its its semantics are defined in another spec.
@OR13,
imo it should be in the VPR spec... if its in a query... which it is.
Even its its semantics are defined in another spec.
It is not in a VPR query. Your example's indentation was wrong. It's properly fixed in the README.
EDIT: No, your example is right, you just may have been misreading it if you thought it was in the VPR query -- it's not.
@OR13,
The recommendedHandlerOrigins
CHAPI feature and rationale are now mentioned in the VPR spec here:
https://w3c-ccg.github.io/vp-request-spec/#requesting-and-storing-credentials
Provide at least a simple example