DigitalCredential Class
A credential presented or issued by a wallet (https://w3c-fedid.github.io/digital-credentials/#the-digitalcredential-interface), the result of navigator.credentials.get({ digital }) and navigator.credentials.create({ digital }). The wallet is the one of the UserAgentUIBackend (see UserAgentUIBackend.RequestDigitalCredentialAsync).
public sealed class DigitalCredential : Credential- Inheritance
CredentialDigitalCredential
Properties
| Name | Description |
|---|---|
| Data | Gets the response of the wallet, specific to the protocol: the object parsed from its JSON (a JavaScript object for the scripts, a JsonObject when the window has no script engine). |
| Id | Gets the empty string: a digital credential has no identifier. |
| Protocol | Gets the protocol of the request that the wallet answered. |
| Type | Gets the type of the credential (the [[type]] of its interface, e.g. password or public-key). |
Gets the response of the wallet, specific to the protocol: the object parsed from its JSON (a JavaScript object for the scripts, a JsonObject when the window has no script engine).
public object Data { get; }Property value
See also
Protocol
DigitalCredential.csGets the protocol of the request that the wallet answered.
public string Protocol { get; }Property value
See also
Gets the type of the credential (the [[type]] of its interface, e.g. password or public-key).
public override string Type { get; }Property value
See also
Methods
| Name | Description |
|---|---|
| UserAgentAllowsProtocol(string) | Returns whether the user agent allows a protocol (https://w3c-fedid.github.io/digital-credentials/#dom-digitalcredential-useragentallowsprotocol): the presentation protocols (openid4vp-v1-unsigned, openid4vp-v1-signed, openid4vp-v1-multisigned and org-iso-mdoc) and the issuance protocol openid4vci-v1. |
UserAgentAllowsProtocol(string)
DigitalCredential.csReturns whether the user agent allows a protocol (https://w3c-fedid.github.io/digital-credentials/#dom-digitalcredential-useragentallowsprotocol): the presentation protocols (openid4vp-v1-unsigned, openid4vp-v1-signed, openid4vp-v1-multisigned and org-iso-mdoc) and the issuance protocol openid4vci-v1.