-
Notifications
You must be signed in to change notification settings - Fork 22
Generated credential is not valid JSON-LD #13
Copy link
Copy link
Open
Labels
Description
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
issuerproperty specifying creator's DID - the
credentialSubjectshould contain anidspecifying the subject's DID - the
@contextshould contain a contextualization for the contents of theaccountproperty - the
typeshould contain a descriptor for theaccountproperty
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.
Reactions are currently unavailable