question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG] Allow empty credentialSubject

See original GitHub issue

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

YOU MAY DELETE THE PREREQUISITES SECTION if you’re sure you checked all the boxes.

Current Behavior

Validation checking prevents empty credentialSubject

Expected Behavior

JWSTestSuite is expecting empty credentialSubject to succeed. It’s used as credential-0.json in the input test vectors.

{
  "@context": [
    "https://www.w3.org/2018/credentials/v1",
    "https://w3id.org/security/suites/jws-2020/v1"
  ],
  "type": ["VerifiableCredential"],
  "issuer": "did:example:123",
  "issuanceDate": "2021-01-01T19:23:24Z",
  "credentialSubject": {}
}

Note that this is the reason test vector credential-0 is failing.

Failure Information

Receive error:

TypeError: credentialSubject must not be empty

Steps to Reproduce

Clone JWS-Test-Suite and then:

cd  JWS-Test-Suite/implementations/did-jwt-vc
npm run install
npm run test

Environment Details

Failure Logs/Screenshots

    TypeError: credentialSubject must not be empty

Alternatives you considered

Please provide details about an environment where this bug does not occur.


Don’t paste private keys anywhere public!

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
mirceaniscommented, May 18, 2022

It seems that the behavior is correct (see #107) so I’m closing this

1reaction
kimdhamiltoncommented, Mar 9, 2022

@mirceanis, no need to create a CODEOWNERS file – I just want to help handle PRs, issues, etc. Ack on semantic versioning. I’ll make sure I’m subscribed to did-jwt as well

Read more comments on GitHub >

github_iconTop Results From Across the Web

Normative definition of credentialSubject including legal types
credentialSubject array prevents mapping to JWT and introduces errors in many VC libraries. Even though the data model does/should allow it, ...
Read more >
Verifiable Credentials Data Model v1.1 - W3C
Verifiable presentations allow any verifier to verify the authenticity of verifiable credentials from any issuer.
Read more >
Create and issue verifiable credentials in ASP.NET Core ...
To issue credentials, the application must manage the credential subject data as well as require authenticated users who would like to add ...
Read more >
Verifiable Credential - Presentation request gives an Internal ...
Company A: I have one Microsoft Verifiable Account to create the credentials for Company A employee. Company B: I have one Microsoft Verifiable ......
Read more >
verifiable - Go Packages
It provides the data structures and functions which allow to process the ... CredentialOpt) (*Credential, error); func (vc *Credential) ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found