Closed bslassey closed 1 year ago
I've had some side conversations asking about how mdoc requests could be composed with requests for other credential types within the Credential Management API. Here's some hand waving of what that could look like along with some mocks that @samuelgoto put together thinking through how a browser might present this sort of combined request. The use case this uses as an example is verifying a user's age.
let mdoc_options = {
documentType: "org.iso.18013.5.1.mDL",
requestedElements: [
{ namespace: "org.iso.18013.5.1", name: "age_over_18r" },
],
desiredStorageDuration: {
days: 7,
},
nonce,
};
let fedcm_options = {
provider: [
'https://accounts.google.com'
],
age_over_18: true
}
navigator.credentials.get({mdoc: mdoc_options,
identity: fedcm_options})
.then((credentialDocument) => { ... });
navigator.credentials.get({
mdoc: nonce,
identity: {
provider: [
'https://accounts.google.com'
]
},
attribute: age-over,
attribute-condition: 18
})
had some offline chats and landed on creating a new namespace navigator.identity
which mirrors functionality of navigator.credentials
and update the PR accordingly.
I think @agl's PR #5 is a better direction overall so I'm going to close this PR
resolves issue #2