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
Credential DigitalCredential

Properties

NameDescription
DataGets 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).
IdGets the empty string: a digital credential has no identifier.
ProtocolGets the protocol of the request that the wallet answered.
TypeGets 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; }

Gets the empty string: a digital credential has no identifier.

public override string Id { get; }

Property value

string

Gets the protocol of the request that the wallet answered.

public string Protocol { get; }

Gets the type of the credential (the [[type]] of its interface, e.g. password or public-key).

public override string Type { get; }

Methods

NameDescription
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.cs

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.

public static bool UserAgentAllowsProtocol(string protocol)