Additional type properties for VC issuance [OpenBadges 3.0]
Summary
This feature request is to modify the Hyperledger Identus agent to allow for a flexible type property in Verifiable Credentials (VCs). This change is necessary to achieve compatibility with OpenBadges 3.0 and to provide more versatility in credential types.
For further discussion on what OpenBadges 3.0 is and why to achieve compatibility with it, please refer to the Achieve compatibility with OpenBadges 3.0 [Summary].
Current Situation
Currently, the Identus agent uses a fixed value for the type property when creating a VC:
"type": ["VerifiableCredential"]
Proposed Changes
To align with the OpenBadges 3.0 specification, which requires an additional type, and to enhance the versatility of Identus-issued credentials, I propose to make the type property settable to an array of strings within the current API.
Add an optional property to the existing endpoint for offering credentials: /issue-credentials/credentials-offers
{
"type": ["VerifiableCredential", "OpenBadgeCredential"]
}
If the type property is not set, the default value should be ["VerifiableCredential"] as it is now.
There should be some additional checks to verify that the provided types are aligned with the spec and e.g., VerifiableCredential is always the first in the list.
This is a very easy change and should not have any side effects: Good first issue.
Additional resources from the VC 2.0 spec:
All OpenBadges 3.0-related issues are moved to the cloud-agent backlog. We cannot start working on this feature right now, as we have to add JSON-LD VC type and align the model with VCDM 2.0