diff --git a/common.js b/common.js index 136c0bb1..5faa7b1b 100644 --- a/common.js +++ b/common.js @@ -410,10 +410,7 @@ async function injectOas(config, document) { let holderApi = await SwaggerParser.validate('holder.yml'); console.log('API name: %s, Version: %s', holderApi.info.title, holderApi.info.version); - let workflowApi = await SwaggerParser.validate('workflow.yml'); - console.log('API name: %s, Version: %s', - workflowApi.info.title, workflowApi.info.version); - const apis = [issuerApi, verifierApi, holderApi, workflowApi]; + const apis = [issuerApi, verifierApi, holderApi]; buildApiSummaryTables({config, document, apis}); buildEndpointDetails({config, document, apis}); diff --git a/components/WorkflowStartResponse.yml b/components/WorkflowStartResponse.yml deleted file mode 100644 index 579d701f..00000000 --- a/components/WorkflowStartResponse.yml +++ /dev/null @@ -1,50 +0,0 @@ -openapi: 3.0.0 -info: - version: "0.0.3-unstable" - title: VC HTTP 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: - WorkflowStartResponse: - type: object - description: A response to a request to start a workflow. - properties: - verifiablePresentationRequest: - $ref: "#/components/schemas/VerifiablePresentationRequest" - example: - { - "verifiablePresentationRequest": { - "query": [{ - "type": "DIDAuth" - }, { - "type": "QueryByExample", - "credentialQuery": { - "reason": "We need to see your existing University Degree credential.", - "example": { - "@context": [ - "https://www.w3.org/2018/credentials/v1", - "https://www.w3.org/2018/credentials/examples/v1" - ], - "type": "UniversityDegreeCredential" - } - } - }], - "challenge": "3182bdea-63d9-11ea-b6de-3b7c1404d57f", - "domain": "edu.example", - "interact": { - "service": [{ - "type": "UnmediatedPresentationService2021", - "serviceEndpoint": "https://edu.example/workflows/123456/presentations" - }] - } - } - } - VerifiablePresentationRequest: - $ref: "./VerifiablePresentationRequest.yml#/components/schemas/VerifiablePresentationRequest" diff --git a/diagrams/exchange-generic.svg b/diagrams/exchange-generic.svg new file mode 100644 index 00000000..e1ff0196 --- /dev/null +++ b/diagrams/exchange-generic.svg @@ -0,0 +1,23 @@ +HolderHolderHolder App(Wallet)Holder App(Wallet)Issuer/Verifier App(Issuer/Verifier Public Website)Issuer/Verifier App(Issuer/Verifier Public Website)Generic VC API Exchange1.HTTP request to start exchange (e.g., send credentials, get credentials, etc.)2.Verifiable Presentation Request, including method ofinteraction, forpurposes of exchange3.Verifiable Presentationsent viainteractionmechanism tomeet requirements of exchange4.Verifiable Presentationwith result of exchange (e.g., VCs),or VPR with new interaction request, or error description diff --git a/diagrams/workflow-generic.svg b/diagrams/workflow-generic.svg deleted file mode 100644 index 99f45987..00000000 --- a/diagrams/workflow-generic.svg +++ /dev/null @@ -1,23 +0,0 @@ -HolderHolderHolder App(Wallet)Holder App(Wallet)Issuer/Verifier App(Issuer/Verifier Public Website)Issuer/Verifier App(Issuer/Verifier Public Website)Generic VC API Workflow1.HTTP request to start workflow (e.g., send credentials, get credentials, etc.)2.Verifiable Presentation Request, including method ofinteraction, forpurposes of workflow3.Verifiable Presentationsent viainteractionmechanism tomeet requirements of workflow4.Verifiable Presentationwith result of workflow (e.g., VCs),or VPR with new interaction request, or error description \ No newline at end of file diff --git a/index.html b/index.html index 3c1e7779..d4a6be49 100644 --- a/index.html +++ b/index.html @@ -533,7 +533,7 @@

Presenting

@@ -572,42 +572,25 @@

Continue Exchange

data-api-endpoint="put /exchanges/{exchange-id}/{transaction-uuid}">
- - -
-

Workflows

-

-The following APIs are defined for executing Verifiable Credential workflows. -

- -
- -

-Workflows are an experimental feature that is currently being explored by the -group. This feature is likely to undergo significant revision as conversations -around the feature progress. -

+
+

Exchange Examples

The APIs in this specification enables unmediated (automated, -machine-to-machine) or mediated (person in the loop) workflows to be -executed. These workflows are initiated by a Holder App and responded to by -any App that implements workflows. The flows consist of the following steps: +machine-to-machine) or mediated (person in the loop) exchanges to be +executed. These exchanges are initiated by a Holder App and responded to by +any App that implements exchanges. The flows consist of the following steps:

  1. The Holder App contacts the receiving App to request the initiation of a -particular workflow. +particular exchange.
  2. The receiving App responds with a presentation request of some kind to authenticate and/or authorize the Holder App and provides the next hop in the -workflow as a URL. +exchange as a URL.
  3. The Holder App responds to the receiving App with a Verifiable Presentation @@ -624,10 +607,10 @@

    Workflows

    A diagram of the steps outlined above is presented below:

    - +

    -The general workflow above can be performed in a way that is fully automated, +The general exchange above can be performed in a way that is fully automated, mediated by a person, or in a hybrid fashion where portions are automated but interaction by a person is required at certain stages. The second step above is used to provide guidance on whether the next step is automated or @@ -640,8 +623,8 @@

    Workflows

    -POST /workflows/refresh-degree/start HTTP/1.1
    +          title="Step 1 (request to issuer): Initiate degree refresh exchange">
    +POST /exchanges/refresh-degree HTTP/1.1
     Host: example.edu
     Content-Type: application/json
     Accept: application/json, */*
    @@ -676,7 +659,7 @@ 

    Workflows

    "interact": { "service": [{ "type": "UnmediatedPresentationService2021", - "serviceEndpoint": "https://example.edu/workflows/123456/presentations" + "serviceEndpoint": "https://example.edu/exchanges/refresh-degree/0bc42ece-89f7-11ec-9af0-136dfa9e4dbb" }] } } @@ -700,16 +683,9 @@

    Workflows

    `MediatedPresentationService2021`.

    -

    -We should make it clear that Issuers can choose to use one or more presentation -request formats simultaneously in order to maximize the chances that a given -client will be able to respond to a refresh workflow. This should probably be -more clearly stated in the VC-API specification. -

    -
    -POST /workflows/123456/presentations HTTP/1.1
    +POST /exchanges/refresh-degree/0bc42ece-89f7-11ec-9af0-136dfa9e4dbb HTTP/1.1
     Host: example.edu
     Content-Type: application/json
     Accept: application/json, */*
    @@ -746,7 +722,7 @@ 

    Workflows

    }, "refreshService": { "type": "AutoRefresh2021", - "url": "https://example.edu/workflows/refresh-degree/start", + "url": "https://example.edu/exchanges/refresh-degree", "validAfter": "2021-09-01T19:23:24Z" }, "proof": { @@ -806,7 +782,7 @@

    Workflows

    }, "refreshService": { "type": "AutoRefresh2021", - "url": "https://example.edu/workflows/refresh-degree/start", + "url": "https://example.edu/exchanges/refresh-degree", "validAfter": "2027-03-14T19:23:24Z", "validUntil": "2027-07-14T19:23:24Z" }, @@ -821,46 +797,7 @@

    Workflows

    }] }
    - -
    -

    Start Workflow

    -

    -The existing Presentation Availability -endpoint requires a Verifiable Presentation to be submitted to the endpoint. -The Start Workflow endpoint defined here generalizes the Presentation Availability endpoint by -allowing arbitrary data to be posted to the endpoint. It is suggested that we -can merge the API endpoint defined in this section with the Presentation Availability endpoint via -the generalization provided in this section. The term "workflow" is a working -title and is not intended to be the final feature name. -

    - -
    - -
    -

    Workflow Interaction

    - -

    -The existing Submit Presentation endpoint is -highly similar to this endpoint and only differs in the return values provided -by the endpoint. The Workflow Interaction endpoint defined here -generalizes the Submit Presentation endpoint -by allowing more variability in what is returned to the client and leaving some -of the HTTP response codes undefined (which can be extended through other -application-specific means). It is suggested that we can merge the API endpoint -defined in this section with the Submit -Presentation endpoint via the generalization provided in this section. The -term "workflow" is a working title and is not intended to be the final feature -name. -

    - -
    -
    -
diff --git a/workflow.html b/workflow.html deleted file mode 100644 index a1467cc6..00000000 --- a/workflow.html +++ /dev/null @@ -1,20 +0,0 @@ - - - - W3C CCG - VC Workflow HTTP API - - - - - - - - - - - diff --git a/workflow.yml b/workflow.yml deleted file mode 100644 index b3b8f913..00000000 --- a/workflow.yml +++ /dev/null @@ -1,72 +0,0 @@ -openapi: 3.0.0 -info: - version: "0.0.3-unstable" - title: VC Workflow HTTP 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: - /workflows/{name}/start: - post: - summary: Start a workflow. - description: - Starts a workflow with the given name. Optionally, additional information can be provided to the server in the request body that can help it fine tune what information to request from the client in order to continue with the workflow. - requestBody: - description: Optional and arbitrary POST data that the client might provide to the server to help it fine tune what information to request from the client in order to continue with the workflow. - content: - application/json: - schema: - oneOf: - - type: object - responses: - "201": - description: A new workflow was successfully created for the client. - content: - application/json: - schema: - $ref: "#/components/schemas/WorkflowStartResponse" - "400": - description: The workflow request was malformed. - "500": - description: Internal Error - "501": - description: Not implemented - /workflows/{id}/presentations: - post: - summary: Present information to an active workflow. - description: "Delivery endpoint for a client-holder to provide a presentation in compliance with the Verifiable Presentation Request provided in the Notification call. This server-holder MUST match the 'domain' and 'challenge' to a 'domain' and 'challenge' previously sent in a Notification Response, and not already received. The server-holder MUST verify the Presentation. The server MUST store the Presentation if verification passes." - requestBody: - description: Details the client provides to the server to help it decide if the presentation should be made. - content: - application/json: - schema: - $ref: "#/components/schemas/VerifiablePresentation" - responses: - "200": - description: Presentation was successful - content: - application/json: - schema: - $ref: "#/components/schemas/VerifiablePresentation" - "201": - description: Presentation was received and a new workflow was successfully created for the client. - content: - application/json: - schema: - $ref: "#/components/schemas/WorkflowStartResponse" - "400": - description: Presentation is malformed - "501": - description: Not Implemented - "500": - description: Internal Server Error -components: - schemas: - WorkflowStartResponse: - $ref: "./components/WorkflowStartResponse.yml#/components/schemas/WorkflowStartResponse" - VerifiablePresentation: - $ref: "./components/VerifiablePresentation.yml#/components/schemas/VerifiablePresentation"