hyperledger-identus / hyperledger-identus/cloud-agent
Extendable Issuer Property for VC issuance [OpenBadges 3.0]
- Dominant language
- Scala
- Stars
- 95
- Forks
- 34
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 14
Description
## Summary
This feature request is to modify the Hyperledger Identus agent to allow for a flexible `issuer` property in Verifiable Credentials (VCs). This change is necessary to achieve full compatibility with OpenBadges 3.0 and to provide more versatility in describing the issuer of a credential.
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]](https://github.com/hyperledger/identus/issues/7).
## Current Situation
Currently, the Identus agent uses a string value for the `issuer` property when creating a VC:
```json
"issuer": "did:prism:123..."
```
## Proposed Changes
To align with the OpenBadges 3.0 specification, which allows for a more detailed issuer description, and to enhance the versatility of Identus-issued credentials, I propose to make the issuer property **optionally** accept an object within the current API to replace the issuer-string.
The structure of that optional property might look like this in the existing endpoint for offering credentials: `/issue-credentials/credentials-offers`:
```json
"issuer": {
"name": "Example University",
"type": ["Profile"],
"image": "https://example.edu/logo.png"
}
```
- The provided json is not allowed to contain the `id` field, which should be set by the Identus agent based on the DID of the issuer.
- If the issuer property is not set the current behavior should be maintained (ie. `"issuer":"did:prism:123"`).
This change also requires changes in the SDKs to handle the issuer object correctly, since they are currently expecting a string with the DID.
## Additional resources:
[Issuer explanation from the VC 2.0 spec](https://www.w3.org/TR/vc-data-model-2.0/#issuer)
[Example of Issuer object from the OB 3.0 spec](https://www.imsglobal.org/spec/ob/v3p0/#example-sample-credential-a)
Contributor guide
Assessment
This issue has not been assessed yet.