Slide 24
Slide 24 text
credentials.get()
const credentialQuery = {
web: {
VerifiablePresentation: {
query: {
type: 'QueryByExample',
credentialQuery: {
// an optional reason for requesting this credential
reason: 'We need you to prove your eligibility to work.’,
example: {
'@context': [
'https://www.w3.org/2018/credentials/v1',
'https://w3id.org/citizenship/v1'
],
type: 'PermanentResidentCard'
}
}
},
// a 128-bit randomly generated value encoded as a string (use a UUID);
challenge: '3182bdea-63d9-11ea-b6de-3b7c1404d57f’,
// the domain that must be digitally signed in the authentication
domain: 'jobs.example.com'
}
}
};
サンプル
参考: https://w3c-ccg.github.io/vp-request-spec/