-
Notifications
You must be signed in to change notification settings - Fork 3
Closed
Description
Depends on: issue #394
Currently (in draft PR #344), the VPR returned in the vprQuery() function looks like this:
verifiablePresentationRequest: {
query: [
{
type: 'QueryByExample',
credentialQuery: {
reason:
'Please present your Verifiable Credential to complete the verification process.',
example: {
'@context': ['https://www.w3.org/2018/credentials/v1'],
type: ['VerifiableCredential']
}
}
}
]
}
This was just a placeholder. Task: Update that VPR to request read/write zCaps for the VerifiableCredentials and Documents WAS Collections.
The new VPR should look like this:
verifiablePresentationRequest: {
// this is where the response will be sent -- the LC Author polling endpoint
interact: {
type: 'UnmediatedHttpPresentationService2021',
serviceEndpoint: pollingExchangeEndpoint // from PR #344, see below
},
// This is the zCap request detailing which permissions the LC Author app wants
query: [
{
type: 'ZcapQuery',
capabilityQuery: {
reason:
'Linked Creds Author is requesting the permission to read and write to the Verifiable Credentials and VC Evidence collections.',
allowedAction: ['GET', 'PUT', 'POST'],
controller: appInstanceDid, // the app's DID string, generated in issue 394. example: 'did:key:.....'
invocationTarget: [
{ type: 'urn:was:collection', contentType: 'application/vc', name: 'VerifiableCredential collection'},
{ type: 'urn:was:collection', contentType: 'application/octet-stream', name: 'VC Evidence collection' }
]
}
}
]
}Note the two variables in the VPR above:
appInstanceDid -- this is going to be the did:key DID of the app, generated in issue #394
pollingExchangeEndpoint -- this is the {url of linked creds author}/api/exchanges/[txId] URL from PR #344. This is where the wallet will POST the resulting zCap to.
gobengo
Metadata
Metadata
Assignees
Labels
No labels