decentralized-identity / decentralized-identity/did-jwt-vc

VC JWT spec conformance

Open
#157 0 comments 1 reaction 0 assignees View on GitHub
bug pinned
Dominant language
TypeScript
Stars
212
Forks
46
PR merge metrics
No merged PRs in 30d

Description

### Prerequisites

Please answer the following questions for yourself before submitting an issue.

- [x] I am running the latest version
- [x] I checked the documentation and found no answer
- [x] I checked to make sure that this issue has not already been filed
- [x] Checked VC JWT documentation

### Current Behavior

Putting the credential into vc claim but they should be the payload

### Expected Behavior

The JWT Claim Names vc and vp MUST NOT be present.

JWT claims are allowed within the VC -> https://w3c.github.io/vc-jose-cose/#jose-header-parameters-jwt-claims

### Failure Information

-

#### Steps to Reproduce

sign a verifiable credential and decode it

#### Failure Logs/Screenshots

Current payload

```json
{
"vc": {
"@context": [
"https://www.w3.org/2018/credentials/v1",
"https://www.w3.org/2018/credentials/examples/v1"
],
"type": [
"VerifiableCredential",
"UniversityDegreeCredential"
],
"credentialSubject": {
"degree": {
"type": "BachelorDegree",
"name": "Baccalauréat en musiques numériques"
}
}
},
"@context": [
"https://www.w3.org/2018/credentials/v1",
"https://www.w3.org/2018/credentials/examples/v1"
],
"type": [
"VerifiableCredential",
"UniversityDegreeCredential"
],
"issuer": "did:key:z6MkevpFoSarBAXiotnQ5GEPRaVEbUwXovpsKY1UQRKKciRF#test-key",
"credentialSubject": {
"degree": {
"type": "BachelorDegree",
"name": "Baccalauréat en musiques numériques"
}
},
"iss": "did:key:z6MkevpFoSarBAXiotnQ5GEPRaVEbUwXovpsKY1UQRKKciRF#test-key"
}
```

Expected payload:

```json
{
"@context": [
"https://www.w3.org/ns/credentials/v2",
"https://www.w3.org/ns/credentials/examples/v2"
],
"id": "http://university.example/credentials/3732",
"type": [
"VerifiableCredential",
"ExampleDegreeCredential",
"ExamplePersonCredential"
],
"issuer": "https://university.example/issuers/14",
"validFrom": "2010-01-01T19:23:24Z",
"credentialSubject": {
"id": "did:example:ebfeb1f712ebc6f1c276e12ec21",
"degree": {
"type": "ExampleBachelorDegree",
"name": "Bachelor of Science and Arts"
},
"alumniOf": {
"name": "Example University"
}
},
"credentialSchema": [
{
"id": "https://example.org/examples/degree.json",
"type": "JsonSchema"
},
{
"id": "https://example.org/examples/alumni.json",
"type": "JsonSchema"
}
]
}
```

#### Alternatives you considered

-

---

> **Don't paste private keys anywhere public!**

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.