[BUG] Allow empty credentialSubject
See original GitHub issuePrerequisites
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:
- Created 2 years ago
- Comments:7 (3 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It seems that the behavior is correct (see #107) so I’m closing this
@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