Skip to content

Add support for the Digital Credentials API #476

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

leecam
Copy link

@leecam leecam commented Mar 31, 2025

Adds a new annex to defining support for the DC API

closes #410

Adds a new annex to defining support for the DC API
@leecam
Copy link
Author

leecam commented Mar 31, 2025

Still work in progress, but can get some initial comments


* `status`: REQUIRED. A string containing one of the status codes defined in this section.

The following status codes are supported:
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: Need to decide what error codes to support here.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably offer_declined?

Copy link
Contributor

@paulbastian paulbastian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good so far, some minor suggestions

Comment on lines +2108 to +2112
credential_issuer: "...",
credential_configuration_ids: [...],
grants: {...}
credential_issuer_metadata: {...},
authorization_server_metadata: {...}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Grouping it like this, may enable to reuse the existing object used from vanilla vci flows

Suggested change
credential_issuer: "...",
credential_configuration_ids: [...],
grants: {...}
credential_issuer_metadata: {...},
authorization_server_metadata: {...}
credential-offer: {
credential_issuer: "...",
credential_configuration_ids: [...],
grants: {...}
}
credential_issuer_metadata: {...},
authorization_server_metadata: {...}


## Credential Offer {#dc_api_credential_offer}

The Issuer sends the Credential Offer object to the Digital Credentials API. All of the Credential Offer parameters MAY be used. The Credential Offer object has been extended to include the following parameters:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The Issuer sends the Credential Offer object to the Digital Credentials API. All of the Credential Offer parameters MAY be used. The Credential Offer object has been extended to include the following parameters:
The Issuer sends the Credential Offer object to the Digital Credentials API. All of the Credential Offer parameters MAY be used. As some implementations of the DC API may not allow to network calls, the Credential Offer object is extended to include the following parameters:

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's more "to allow all the installed wallets to figure out if they can handle the request without fetching external data that may result in data being leaked without user consent"? Not sure.

Copy link
Contributor

@tplooker tplooker Apr 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree with @jogu as its highlighting why some DC API implementations have this limitation.



* `credential_issuer_metadata`: REQUIRED. The Issuer's Credential Issuer Metadata object as defined in (#credential-issuer-parameters).
* `authorization_server_metadata`: OPTIONAL. The Authorization Server metadata object as defined by Section 2 of [@!RFC8414]. When provided the `authorization_server` parameter must not be present.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* `authorization_server_metadata`: OPTIONAL. The Authorization Server metadata object as defined by Section 2 of [@!RFC8414]. When provided the `authorization_server` parameter must not be present.
* `authorization_server_metadata`: REQUIRED. The Authorization Server metadata object as defined in (#as-metadata).


* `status`: REQUIRED. A string containing one of the status codes defined in this section.

The following status codes are supported:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably offer_declined?


* `openid4vci-v1`

## Credential Offer {#dc_api_credential_offer}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see potential for other requests, i.e. calling DC-API to continue a deferred issuance with transaction_id

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mean like using the DC API to notify the wallet that a deferred issuance is now ready for issuance?

The Issuer sends the Credential Offer object to the Digital Credentials API. All of the Credential Offer parameters MAY be used. The Credential Offer object has been extended to include the following parameters:


* `credential_issuer_metadata`: REQUIRED. The Issuer's Credential Issuer Metadata object as defined in (#credential-issuer-parameters).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

feels somewhat redundant?

Suggested change
* `credential_issuer_metadata`: REQUIRED. The Issuer's Credential Issuer Metadata object as defined in (#credential-issuer-parameters).
* `credential_issuer_metadata`: REQUIRED. The Credential Issuer Metadata object as defined in (#credential-issuer-parameters).

Comment on lines +2074 to +2078
The name "Digital Credentials API" (DC API) encompasses the W3C Digital Credentials API [@!W3C.Digital_Credentials_API]
as well as its native App Platform equivalents in operating systems (such as [Credential Manager on Android](https://developer.android.com/jetpack/androidx/releases/credentials)).
The DC API allows web sites and native apps acting as Issuers to initiate the issuance of verifiable credentials.
The API itself is agnostic to the Credential issuance protocol and can be used with different protocols.
The Web Platform, working in conjunction with other layers, such as the app platform/operating system, and based on the permission of the End-User, will send the credential offer along with the Origin of the Issuer to the End-User's chosen Wallet.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The name "Digital Credentials API" (DC API) encompasses the W3C Digital Credentials API [@!W3C.Digital_Credentials_API]
as well as its native App Platform equivalents in operating systems (such as [Credential Manager on Android](https://developer.android.com/jetpack/androidx/releases/credentials)).
The DC API allows web sites and native apps acting as Issuers to initiate the issuance of verifiable credentials.
The API itself is agnostic to the Credential issuance protocol and can be used with different protocols.
The Web Platform, working in conjunction with other layers, such as the app platform/operating system, and based on the permission of the End-User, will send the credential offer along with the Origin of the Issuer to the End-User's chosen Wallet.
The term "Digital Credentials API" (DC API) encompasses the W3C Digital Credentials API [@!W3C.Digital_Credentials_API]
as well as its native App Platform equivalents in operating systems (such as [Credential Manager on Android](https://developer.android.com/jetpack/androidx/releases/credentials)).
The API itself is agnostic to the Credential issuance protocol and can be used with different protocols.
When the DC API is used with this specification, it allows web sites and native apps acting as Issuers to initiate the issuance of verifiable credentials.
The Web Platform, working in conjunction with other layers, such as the app platform/operating system, and based on the permission of the End-User, will send the Credential Offer along with the Origin of the Issuer to the End-User's chosen Wallet.


To use OpenID4VCI with the Digital Credentials API (DC API), the exchange protocol value has the following format: `openid4vci-v<version>`.

The value `1` MUST be used for the `<version>` field to indicate the request and response are compatible with this version of the specification.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to be explicit here that the version essentially constitutes a MAJOR version as per semver and therefore implementations should adopt the robustness principle when it comes to things like ignoring unknown elements in maps/objects to support forward compatibility with minor changes?


The following status codes are supported:

`offer_accepted`:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clarifying question: is the idea the issuer sends the offer and gets a confirmation from the wallet, but the actual issuance happens in a separate, parallel process within the wallet?

Copy link
Member

@c2bo c2bo May 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That would be my understanding right now, the DC API flow basically succeeds with reaching a wallet and the "real" issuance flow starts from there from the Wallet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

OID4VCI with Digital Credentials API
7 participants