-
Notifications
You must be signed in to change notification settings - Fork 44
Description
While working on w3c-fedid/digital-credentials#149 it occurred to me that perhaps we should let mediation be nullable and make null the default - changed my mind... let's remove the default value entirely.
The rationale is that a credential interface determines what its mediation requirements (and could determine its own default value), as per steps 8.1:
- For each interface of interfaces:
8.1 If options.mediation is conditional and interface does not support conditional user mediation, return a promise rejected with a "TypeError" DOMException.
So, for example, for Digital Credential, a missing value (null) could be treated as "required". And the DC API could also define the allowed values in a backwards compatible / extensible way.
The problem right now for DC API is that mediation is always required, so that means every call to .get() must include {"mediation": "required"}, which is annoying from a developer point of view. It should just default to "required" when the credential type is DigitalCredential instead.