Skip to content

VC JWT spec conformance #157

@F-Node-Karlsruhe

Description

@F-Node-Karlsruhe

Prerequisites

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

  • I am running the latest version
  • I checked the documentation and found no answer
  • I checked to make sure that this issue has not already been filed
  • 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

{
  "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:

{
  "@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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpinnedan issue that may take a while to fix and should not be closed automatically.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions