Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for JWT encoded verifiable presentations. #346

Open
Exulansis opened this issue Aug 28, 2019 · 1 comment
Open

Add support for JWT encoded verifiable presentations. #346

Exulansis opened this issue Aug 28, 2019 · 1 comment

Comments

@Exulansis
Copy link
Collaborator

Similar to the approach outlined above, but instead of using a simple JSON-LD document containing a proof section, a JWT is used. An example as given by the spec (example 30):

{
  "iss": "did:example:ebfeb1f712ebc6f1c276e12ec21",
  "jti": "urn:uuid:3978344f-8596-4c3a-a978-8fcaba3903c5",
  "aud": "did:example:4a57546973436f6f6c4a4a57573",
  "iat": 1541493724,
  "exp": 1573029723,
  "nonce": "343s$FSFDa-",
  "vp": {
    "@context": [
      "https://www.w3.org/2018/credentials/v1",
      "https://www.w3.org/2018/credentials/examples/v1"
    ],
    "type": ["VerifiablePresentation", "CredentialManagerPresentation"],
    // base64url-encoded JWT as string
    "verifiableCredential": ["..."]
  }
}

The Verifiable presentation is represented as a linked data document, associated with the vp key of the JWT

Keys one would normally find in the JSON-LD document are replaced (where possible) with JWT keys, e.g. iss (issuer), jti (id), exp (expirationDate). The full list of claim names that MUST be used is listed in the specification.

The header section of the JWT would look as follows:

{
    "alg": "RS256",
    "typ": "JWT",
    "kid": "did:example:abfe13f712120431c276e12ecab#keys-1"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants