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 returnCredential option to VerifyOptions #366

Merged
merged 5 commits into from
Feb 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions components/VerificationResult.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,7 @@ components:
description: Errors
items:
type: string
verifiedCredential:
type: object
description: The verified credential
example: { "checks": ["proof"], "warnings": [], "errors": [] }
7 changes: 7 additions & 0 deletions components/VerifyOptions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,18 @@ components:
domain:
type: string
description: The intended domain of validity for the proof. For example website.example
returnCredential:
type: boolean
jrhender marked this conversation as resolved.
Show resolved Hide resolved
description:
Should the verified credential be returned in the response?
If true, then the verified credential should be returned in the form in which it was verified.
If false or not provided, then the verified credential should not be returned.
example:
{
"verificationMethod": "did:example:123#z6MksHh7qHWvybLg5QTPPdG2DgEjjduBDArV9EF9mRiRzMBN",
"proofPurpose": "assertionMethod",
"created": "2020-04-02T18:48:36Z",
"domain": "example.com",
"challenge": "d436f0c8-fbd9-4e48-bbb2-55fc5d0920a8",
"returnCredential": true
}
2 changes: 1 addition & 1 deletion respec-oas.js
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ function renderJsonSchemaValue(property, value) {
valueRendering =
`The <code>${property}</code> object MUST be `;
valueRendering += renderJsonSchemaObject(value);
} else if(value.type === 'string') {
} else if(value.type === 'string' || value.type === 'boolean') {
// no-op
} else {
valueRendering = '<pre>' + JSON.stringify(value, null, 2) + '</pre>';
Expand Down