Skip to content

Generated credential is not valid JSON-LD #13

@dysbulic

Description

@dysbulic

The current Verifiable Credential looks like:

{
  iat: 1613091180
  iss: "did:web:oiekhuylog.execute-api.us-west-2.amazonaws.com"
  nbf: 1613091180
  sub: "did:3:kjzl6cwe1jw14b66fwpkbtsjr6l12rhtbrp48u0myiooozc0w559sv6e5yty0z4"
  vc: {
    @context: ["https://www.w3.org/2018/credentials/v1"]
    type: ["VerifiableCredential"]
    credentialSubject:
      account: {
        type: "Github"
        url: "https://gist.githubusercontent.com/dysbulic/2d6173168e3418d91acb9d83d53f35b6/raw/b342e5b8ab56781dc7adda4af2b693077bcabb84/IDX%20DID"
        username: "dysbulic"
      }
    }
  }
}

There are several parts of the VC & JSON-LD specifications are not followed. These include:

  • the credential should contain an issuer property specifying creator's DID
  • the credentialSubject should contain an id specifying the subject's DID
  • the @context should contain a contextualization for the contents of the account property
  • the type should contain a descriptor for the account property

The issuer and subject are present as the iss & sub properties, but I'm pretty sure they're also supposed to be present in the VC in case the JWT wrapper is stripped off in a presentation.

My understanding is JSON-LD's context is supposed to contain entries for all the elements in the document.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions