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

cleanup issueCredentialOptions and VerifyOptions #375

Merged
merged 8 commits into from
Mar 26, 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
1 change: 0 additions & 1 deletion components/Challenge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,3 @@ components:
uses:
type: string
description: The number of times options.challenge has been used

30 changes: 30 additions & 0 deletions components/CreatePresentationOptions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
openapi: 3.0.0
info:
version: "0.0.3-unstable"
title: VC API
description: This is an Experimental Open API Specification for the [VC Data Model](https://www.w3.org/TR/vc-data-model/).
license:
name: W3C Software and Document License
url: http://www.w3.org/Consortium/Legal/copyright-software.
contact:
name: GitHub Source Code
url: https://github.com/w3c-ccg/vc-api
paths:
components:
schemas:
CreatePresentationOptions:
type: object
additionalProperties: false
description: Options for specifying how a Presentation is created
properties:
challenge:
type: string
description: A challenge provided by the requesting party of the proof. For example, 6e62f66e-67de-11eb-b490-ef3eeefa55f2.
domain:
type: string
description: The intended domain of validity for the proof. For example, website.example.
example:
{
"challenge": "d436f0c8-fbd9-4e48-bbb2-55fc5d0920a8",
"domain": "example.com"
}
59 changes: 28 additions & 31 deletions components/DeriveCredentialOptions.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,28 @@
openapi: 3.0.0
info:
version: "0.0.3-unstable"
title: VC API
description: This is an Experimental Open API Specification for the [VC Data Model](https://www.w3.org/TR/vc-data-model/).
license:
name: W3C Software and Document License
url: http://www.w3.org/Consortium/Legal/copyright-software.
contact:
name: GitHub Source Code
url: https://github.com/w3c-ccg/vc-api
paths:
components:
schemas:
DeriveCredentialOptions:
type: object
additionalProperties: false
description: Options for specifying how the derived credential is created.
properties:
nonce:
type: string
description: An encoded nonce provided by the holder of the credential, to be included in the DataIntegrityProof.
selectivePointers:
type: array
items:
type: string
description: An array of JSON pointers specifying the selectively disclosed information.
example:
{
"nonce": "lEixQKDQvRecCifKl789TQj+Ii6YWDLSwn3AxR0VpPJ1QV5htod/0VCchVf1zVM0y2E=",
}
openapi: 3.0.0
info:
version: "0.0.3-unstable"
title: VC API
description: This is an Experimental Open API Specification for the [VC Data Model](https://www.w3.org/TR/vc-data-model/).
license:
name: W3C Software and Document License
url: http://www.w3.org/Consortium/Legal/copyright-software.
contact:
name: GitHub Source Code
url: https://github.com/w3c-ccg/vc-api
paths:
components:
schemas:
DeriveCredentialOptions:
type: object
additionalProperties: false
description: Options for specifying how the derived credential is created.
properties:
selectivePointers:
type: array
description: An array of JSON pointers specifying the selectively disclosed information.
items:
type: string
example:
{
"selectivePointers": ["/credentialSubject/birthCountry"]
}
11 changes: 4 additions & 7 deletions components/IssueCredentialOptions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,13 @@ components:
IssueCredentialOptions:
type: object
additionalProperties: false
description: Options for specifying how the DataIntegrityProof is created.
description: Options for specifying how a credential is issued.
properties:
created:
type: string
description: The date and time of the proof (with a maximum accuracy in seconds). Defaults to current system time.
mandatoryPointers:
type: array
description: Used with selective disclosure schemes to specify mandatory reveal statements
items:
type: string
description: Used with selective disclosure schemes to specify mandatory reveal statements
credentialId:
type: string
description: >
Expand All @@ -43,6 +40,6 @@ components:
result is never received by the client.
example:
{
"created": "2020-04-02T18:48:36Z",
"credentialStatus": { "type": "RevocationList2020Status" },
"credentialId": "example.com/ad5d541f-db7a-4bff-97e1-d403ce403767",
"mandatoryPointers": ["/issuer", "/validFrom", "/validUntil"]
}
26 changes: 26 additions & 0 deletions components/VerifyCredentialOptions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
openapi: 3.0.0
info:
version: "0.0.3-unstable"
title: VC API
description: This is an Experimental Open API Specification for the [VC Data Model](https://www.w3.org/TR/vc-data-model/).
license:
name: W3C Software and Document License
url: http://www.w3.org/Consortium/Legal/copyright-software.
contact:
name: GitHub Source Code
url: https://github.com/w3c-ccg/vc-api
paths:
components:
schemas:
VerifyCredentialOptions:
type: object
additionalProperties: false
description: Options for specifying how a credential is verified
properties:
returnCredential:
type: boolean
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:
{
"returnCredential": true
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,29 +12,19 @@ info:
paths:
components:
schemas:
VerifyOptions:
VerifyPresentationOptions:
type: object
additionalProperties: false
description: Options for specifying how the DataIntegrityProof is verified.
description: Options for specifying how a presentation is verified
properties:
challenge:
type: string
description: A challenge provided by the requesting party of the proof. For example 6e62f66e-67de-11eb-b490-ef3eeefa55f2
domain:
type: string
description: The intended domain of validity for the proof. For example website.example
returnCredential:
type: boolean
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
"challenge": "d436f0c8-fbd9-4e48-bbb2-55fc5d0920a8"
}
5 changes: 3 additions & 2 deletions verifier.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ paths:
application/json:
schema:
$ref: "#/components/schemas/VerifyPresentationResponse"

"400":
description: Invalid or malformed input
"413":
Expand Down Expand Up @@ -105,6 +104,8 @@ components:
properties:
verifiableCredential:
$ref: "./components/VerifiableCredential.yml#/components/schemas/VerifiableCredential"
options:
$ref: "./components/VerifyCredentialOptions.yml#/components/schemas/VerifyCredentialOptions"
VerifyCredentialResponse:
$ref: "./components/VerificationResult.yml#/components/schemas/VerificationResult"
VerifyPresentationRequest:
Expand All @@ -113,7 +114,7 @@ components:
verifiablePresentation:
$ref: "./components/VerifiablePresentation.yml#/components/schemas/VerifiablePresentation"
options:
$ref: "./components/VerifyOptions.yml#/components/schemas/VerifyOptions"
$ref: "./components/VerifyPresentationOptions.yml#/components/schemas/VerifyPresentationOptions"
ProoflessVerifyPresentationRequest:
type: object
properties:
Expand Down