We should phase out the use of protocols embedded as JSON to deliver CHAPI requests to "URL" based credential handlers -- and instead pass a wallet interaction "protocols" URL, that when retrieved via HTTP GET w/"accept: application/json" (from the requesting origin), will deliver the protocols object.
This approach provides better origin security and reduces the initial URL (query param) size sent to the credential handler's deep link, allowing for larger URLs to be included in the protocols object.
This might be done by having a new credential handler mechanism (name TBD, but perhaps interact) instead of just augmenting "URL".
Alternatively, if interact is provided in protocols to the credential handler API and that protocol is supported by the credential handler (per its manifest.json registration metadata), just that URL could be included in protocols, solving the problem without any other changes. For example:
{
"protocols": {
"vcapi": "<some url>",
"OID4VCI": "<some url>",
"OID4VP": "<some url>",
"anything": "<some url>",
// only protocol "known" to the mediator
"interact": "<some url>"
}
With the above object and a credential handler that has announced it understands "interact", the mediator will only send (to the handler, if chosen), even if the handler also announces it understands (some of) the other protocols:
{
"protocols": {
"interact": "<some url>"
}
We should phase out the use of
protocolsembedded as JSON to deliver CHAPI requests to "URL" based credential handlers -- and instead pass a wallet interaction "protocols" URL, that when retrieved via HTTP GET w/"accept: application/json" (from the requesting origin), will deliver theprotocolsobject.This approach provides better origin security and reduces the initial URL (query param) size sent to the credential handler's deep link, allowing for larger URLs to be included in the protocols object.
This might be done by having a new credential handler mechanism (name TBD, but perhaps
interact) instead of just augmenting "URL".Alternatively, if
interactis provided inprotocolsto the credential handler API and that protocol is supported by the credential handler (per its manifest.json registration metadata), just that URL could be included inprotocols, solving the problem without any other changes. For example:With the above object and a credential handler that has announced it understands
"interact", the mediator will only send (to the handler, if chosen), even if the handler also announces it understands (some of) the other protocols: