Skip to content

Commit a786083

Browse files
jimmarinoarnoweiss
andauthored
feat: Add credentialSchema attribute (eclipse-dataspace-dcp#201)
* Add credentialSchema attribute * Update specifications/credential.issuance.protocol.md Co-authored-by: Arno Weiß <86715435+arnoweiss@users.noreply.github.com> --------- Co-authored-by: Arno Weiß <86715435+arnoweiss@users.noreply.github.com>
1 parent dd5f20d commit a786083

5 files changed

Lines changed: 10 additions & 1 deletion

File tree

artifacts/src/main/resources/context/dcp.jsonld

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@
4747
"credentialType": {
4848
"@id": "dcp:credentialType"
4949
},
50+
"credentialSchema": {
51+
"@id": "dcp:credentialSchema"
52+
},
5053
"offerReason": {
5154
"@id": "dcp:offerReason",
5255
"@type": "xsd:string"

artifacts/src/main/resources/issuance/credential-object-schema.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515
"credentialType": {
1616
"type": "string"
1717
},
18+
"credentialSchema": {
19+
"type": "string"
20+
},
1821
"offerReason": {
1922
"type": "string"
2023
},

artifacts/src/main/resources/issuance/example/credential-object.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
],
55
"type": "CredentialObject",
66
"credentialType": "CompanyCredential",
7+
"credentialSchema": "https://example.com/credentials/credentialSchema",
78
"offerReason": "reissue",
89
"bindingMethods": [
910
"did:web"

artifacts/src/test/java/org/eclipse/dcp/schema/issuance/CredentialObjectSchemaTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ public class CredentialObjectSchemaTest extends AbstractSchemaTest {
2727
{
2828
"type": "CredentialObject",
2929
"credentialType": "VerifiableCredential",
30+
"credentialSchema": "https://example.com/credentials/credentialSchema",
3031
"offerReason": "reissue",
3132
"bindingMethods": [
3233
"did:web"

specifications/credential.issuance.protocol.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,9 +231,10 @@ The following is a non-normative example of a credential offer request:
231231
|--------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
232232
| **Schema** | [JSON Schema](./resources/issuance/credential-object-schema.json) |
233233
| **Required** | - `type`: A string specifying the `CredentialObject` type |
234-
| | - `credentialType`: A single string specifying type of credential being offered |
234+
| | - `credentialType`: A single string specifying type of credential being offered |
235235
| **Optional** | - `@context`: Specifies a valid Json-Ld context ([[json-ld11]], sect. 3.1). As the `credentialObject` is usually embedded, its context is provided by the enveloping object. |
236236
| | - `bindingMethods`: An array of strings defining the key material that an issued credential is bound to |
237+
| | - `credentialSubject`: A URL pointing to the credential schema of the object in a VC's `credentialSubject` property.|
237238
| | - `profiles`: An array of strings containing the aliases of the [profiles](#profiles-of-the-decentralized-claims-protocol), e.g. `"vc20-bssl/jwt"` |
238239
| | - `issuancePolicy`: A [presentation definition](https://identity.foundation/presentation-exchange/spec/v2.0.0/#presentation-definition) [[presentation-ex]] signifying the required [=Verifiable Presentation=] for issuance. |
239240
| | - `offerReason`: A reason for the offer as a string. Valid values may include `reissue` and `proof-key-revocation` |

0 commit comments

Comments
 (0)