Skip to content
This repository has been archived by the owner on Dec 12, 2024. It is now read-only.

Commit

Permalink
Merge branch 'main' into fix/sample-data
Browse files Browse the repository at this point in the history
* main:
  Credential Application & Response Signing/Verification (#135)
  adding outputs for reference (#137)
  • Loading branch information
mistermoe committed Oct 19, 2022
2 parents a78ba9d + 78fc9fd commit 3d69f57
Show file tree
Hide file tree
Showing 44 changed files with 1,287 additions and 692 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[![godoc ssi-service](https://img.shields.io/badge/godoc-ssi--service-blue)](https://github.com/TBD54566975/ssi-service)
[![go version 1.17.6](https://img.shields.io/badge/go_version-1.17.6-brightgreen)](https://go.dev/)
[![go version 1.19.2](https://img.shields.io/badge/go_version-1.19.2-brightgreen)](https://go.dev/)
[![license Apache 2](https://img.shields.io/badge/license-Apache%202-black)](https://github.com/TBD54566975/ssi-service/blob/main/LICENSE)
[![issues](https://img.shields.io/github/issues/TBD54566975/ssi-service)](https://github.com/TBD54566975/ssi-service/issues)
![push](https://github.com/TBD54566975/ssi-service/workflows/ssi-service-ci/badge.svg?branch=main&event=push)
Expand Down
104 changes: 59 additions & 45 deletions doc/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,8 @@ definitions:
$ref: '#/definitions/exchange.Filter'
id:
type: string
optional:
type: boolean
path:
items:
type: string
Expand All @@ -322,9 +324,6 @@ definitions:
exclusiveMinimum: {}
format:
type: string
formatMaximum: {}
formatMinimum:
description: TODO(gabe) these may not be valid https://github.com/decentralized-identity/presentation-exchange/issues/312
maxLength:
type: integer
maximum: {}
Expand Down Expand Up @@ -512,15 +511,29 @@ definitions:
properties:
did:
$ref: '#/definitions/did.DIDDocument'
keyType:
type: string
privateKeyBase58:
type: string
type: object
github.com_tbd54566975_ssi-service_pkg_server_router.CreateManifestRequest:
properties:
manifest:
$ref: '#/definitions/manifest.CredentialManifest'
format:
$ref: '#/definitions/exchange.ClaimFormat'
issuerDid:
type: string
issuerName:
type: string
outputDescriptors:
items:
$ref: '#/definitions/manifest.OutputDescriptor'
type: array
presentationDefinition:
$ref: '#/definitions/exchange.PresentationDefinition'
required:
- manifest
- format
- issuerDid
- outputDescriptors
type: object
github.com_tbd54566975_ssi-service_pkg_server_router.CreateManifestResponse:
properties:
Expand Down Expand Up @@ -708,25 +721,18 @@ definitions:
type: object
github.com_tbd54566975_ssi-service_pkg_server_router.SubmitApplicationRequest:
properties:
applicantDid:
description: Once we have JWT signed wrapper that can get the did this can
be removed
applicationJwt:
type: string
credential_application:
$ref: '#/definitions/manifest.CredentialApplication'
verifiableCredentials:
items: {}
type: array
required:
- applicantDid
- credential_application
- verifiableCredentials
- applicationJwt
type: object
github.com_tbd54566975_ssi-service_pkg_server_router.SubmitApplicationResponse:
properties:
credential_response:
$ref: '#/definitions/manifest.CredentialResponse'
verifiableCredential:
responseJwt:
type: string
verifiableCredentials:
description: this is an interface type to union Data Integrity and JWT style
VCs
items: {}
Expand Down Expand Up @@ -913,15 +919,29 @@ definitions:
properties:
did:
$ref: '#/definitions/did.DIDDocument'
keyType:
type: string
privateKeyBase58:
type: string
type: object
pkg_server_router.CreateManifestRequest:
properties:
manifest:
$ref: '#/definitions/manifest.CredentialManifest'
format:
$ref: '#/definitions/exchange.ClaimFormat'
issuerDid:
type: string
issuerName:
type: string
outputDescriptors:
items:
$ref: '#/definitions/manifest.OutputDescriptor'
type: array
presentationDefinition:
$ref: '#/definitions/exchange.PresentationDefinition'
required:
- manifest
- format
- issuerDid
- outputDescriptors
type: object
pkg_server_router.CreateManifestResponse:
properties:
Expand Down Expand Up @@ -1109,25 +1129,18 @@ definitions:
type: object
pkg_server_router.SubmitApplicationRequest:
properties:
applicantDid:
description: Once we have JWT signed wrapper that can get the did this can
be removed
applicationJwt:
type: string
credential_application:
$ref: '#/definitions/manifest.CredentialApplication'
verifiableCredentials:
items: {}
type: array
required:
- applicantDid
- credential_application
- verifiableCredentials
- applicationJwt
type: object
pkg_server_router.SubmitApplicationResponse:
properties:
credential_response:
$ref: '#/definitions/manifest.CredentialResponse'
verifiableCredential:
responseJwt:
type: string
verifiableCredentials:
description: this is an interface type to union Data Integrity and JWT style
VCs
items: {}
Expand Down Expand Up @@ -1473,7 +1486,7 @@ paths:
"200":
description: OK
schema:
$ref: '#/definitions/github.com_tbd54566975_ssi-service_pkg_server_router.GetDIDMethodsResponse'
$ref: '#/definitions/pkg_server_router.GetDIDMethodsResponse'
summary: Get DID Methods
tags:
- DecentralizedIdentityAPI
Expand All @@ -1494,7 +1507,7 @@ paths:
"200":
description: OK
schema:
$ref: '#/definitions/github.com_tbd54566975_ssi-service_pkg_server_router.GetDIDsByMethodResponse'
$ref: '#/definitions/pkg_server_router.GetDIDsByMethodResponse'
"400":
description: Bad request
schema:
Expand All @@ -1512,7 +1525,7 @@ paths:
name: request
required: true
schema:
$ref: '#/definitions/github.com_tbd54566975_ssi-service_pkg_server_router.CreateDIDByMethodRequest'
$ref: '#/definitions/pkg_server_router.CreateDIDByMethodRequest'
- description: Method
in: path
name: method
Expand All @@ -1524,7 +1537,7 @@ paths:
"201":
description: Created
schema:
$ref: '#/definitions/github.com_tbd54566975_ssi-service_pkg_server_router.CreateDIDByMethodResponse'
$ref: '#/definitions/pkg_server_router.CreateDIDByMethodResponse'
"400":
description: Bad request
schema:
Expand All @@ -1547,7 +1560,7 @@ paths:
name: request
required: true
schema:
$ref: '#/definitions/github.com_tbd54566975_ssi-service_pkg_server_router.CreateDIDByMethodRequest'
$ref: '#/definitions/pkg_server_router.CreateDIDByMethodRequest'
- description: Method
in: path
name: method
Expand All @@ -1564,7 +1577,7 @@ paths:
"200":
description: OK
schema:
$ref: '#/definitions/github.com_tbd54566975_ssi-service_pkg_server_router.GetDIDByMethodResponse'
$ref: '#/definitions/pkg_server_router.GetDIDByMethodResponse'
"400":
description: Bad request
schema:
Expand All @@ -1589,7 +1602,7 @@ paths:
"200":
description: OK
schema:
$ref: '#/definitions/github.com_tbd54566975_ssi-service_pkg_server_router.ResolveDIDResponse'
$ref: '#/definitions/pkg_server_router.ResolveDIDResponse'
"400":
description: Bad request
schema:
Expand All @@ -1608,14 +1621,14 @@ paths:
name: request
required: true
schema:
$ref: '#/definitions/pkg_server_router.PublishManifestRequest'
$ref: '#/definitions/github.com_tbd54566975_ssi-service_pkg_server_router.PublishManifestRequest'
produces:
- application/json
responses:
"201":
description: Created
schema:
$ref: '#/definitions/pkg_server_router.PublishManifestResponse'
$ref: '#/definitions/github.com_tbd54566975_ssi-service_pkg_server_router.PublishManifestResponse'
"400":
description: Bad request
schema:
Expand All @@ -1638,7 +1651,7 @@ paths:
name: request
required: true
schema:
$ref: '#/definitions/pkg_server_router.StoreKeyRequest'
$ref: '#/definitions/github.com_tbd54566975_ssi-service_pkg_server_router.StoreKeyRequest'
produces:
- application/json
responses:
Expand Down Expand Up @@ -1672,7 +1685,7 @@ paths:
"200":
description: OK
schema:
$ref: '#/definitions/pkg_server_router.GetKeyDetailsResponse'
$ref: '#/definitions/github.com_tbd54566975_ssi-service_pkg_server_router.GetKeyDetailsResponse'
"400":
description: Bad request
schema:
Expand Down Expand Up @@ -1826,7 +1839,8 @@ paths:
put:
consumes:
- application/json
description: Submit application
description: Submit a credential application in response to a credential manifest.
The request body is expected to
parameters:
- description: request body
in: body
Expand Down
7 changes: 5 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.19

require (
github.com/BurntSushi/toml v1.2.0
github.com/TBD54566975/ssi-sdk v0.0.1-alpha.0.20221012163631-99a9a918234b
github.com/TBD54566975/ssi-sdk v0.0.1-alpha.0.20221019200812-2e73f0ac7722
github.com/ardanlabs/conf v1.5.0
github.com/dimfeld/httptreemux/v5 v5.4.0
github.com/go-playground/locales v0.14.0
Expand All @@ -29,8 +29,10 @@ require (
)

require (
github.com/buger/jsonparser v1.1.1 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0 // indirect
github.com/flowstack-com/jsonschema v0.1.2 // indirect
github.com/go-logr/logr v1.2.3 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-playground/validator/v10 v10.11.1 // indirect
Expand All @@ -42,7 +44,7 @@ require (
github.com/lestrrat-go/option v1.0.0 // indirect
github.com/multiformats/go-base32 v0.0.3 // indirect
github.com/multiformats/go-base36 v0.1.0 // indirect
github.com/multiformats/go-multicodec v0.6.0 // indirect
github.com/multiformats/go-multicodec v0.7.0 // indirect
github.com/oliveagle/jsonpath v0.0.0-20180606110733-2e52cf6e6852 // indirect
github.com/piprate/json-gold v0.4.2 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
Expand All @@ -51,6 +53,7 @@ require (
github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f // indirect
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
github.com/xeipuuv/gojsonschema v1.2.0 // indirect
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2 // indirect
golang.org/x/sys v0.0.0-20221006211917-84dc82d7e875 // indirect
golang.org/x/term v0.0.0-20220919170432-7a66f970e087 // indirect
golang.org/x/text v0.3.7 // indirect
Expand Down
24 changes: 20 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,9 +1,21 @@
github.com/BurntSushi/toml v1.2.0 h1:Rt8g24XnyGTyglgET/PRUNlrUeu9F5L+7FilkXfZgs0=
github.com/BurntSushi/toml v1.2.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=
github.com/TBD54566975/ssi-sdk v0.0.1-alpha.0.20221012163631-99a9a918234b h1:7JhNPNNGDdIB7Q6kTaHd3cirG1xcDsmEX2ryK+a5iKM=
github.com/TBD54566975/ssi-sdk v0.0.1-alpha.0.20221012163631-99a9a918234b/go.mod h1:zmrYK0NCOKbD6lOOXzZBN51RN6Ai78HuZ3Jt0tqbkm0=
github.com/TBD54566975/ssi-sdk v0.0.1-alpha.0.20221018194946-8583e4f4cc0c h1:BhL+EcNdgDeN0bfkKnBJLBXQJqJT4oZLlj/K+AgCKWI=
github.com/TBD54566975/ssi-sdk v0.0.1-alpha.0.20221018194946-8583e4f4cc0c/go.mod h1:WBOPlvZkJ1qXW5HINQiNxgWTEm5THpkPy8iHXNkYnRY=
github.com/TBD54566975/ssi-sdk v0.0.1-alpha.0.20221018201910-e1f529bd6a66 h1:3QwnubV4j2NQVnSt2YAT1hUHM26hrMS6xq3nPWofV1k=
github.com/TBD54566975/ssi-sdk v0.0.1-alpha.0.20221018201910-e1f529bd6a66/go.mod h1:WBOPlvZkJ1qXW5HINQiNxgWTEm5THpkPy8iHXNkYnRY=
github.com/TBD54566975/ssi-sdk v0.0.1-alpha.0.20221018210928-40550f92af68 h1:sH0LMADYtuTsvjBJPn1hwVIiM73HPHPaQN6xdf5msIY=
github.com/TBD54566975/ssi-sdk v0.0.1-alpha.0.20221018210928-40550f92af68/go.mod h1:WBOPlvZkJ1qXW5HINQiNxgWTEm5THpkPy8iHXNkYnRY=
github.com/TBD54566975/ssi-sdk v0.0.1-alpha.0.20221018231409-c5db11472c38 h1:SvBK316+1tgBJmQOX0khxyRmyXOPtxqonPSQPPrLIuA=
github.com/TBD54566975/ssi-sdk v0.0.1-alpha.0.20221018231409-c5db11472c38/go.mod h1:WBOPlvZkJ1qXW5HINQiNxgWTEm5THpkPy8iHXNkYnRY=
github.com/TBD54566975/ssi-sdk v0.0.1-alpha.0.20221019161256-4b326c0c823a h1:YAdegwCMrbEr1N43FMKmqjObci8q+sc1NVf9qlyLoto=
github.com/TBD54566975/ssi-sdk v0.0.1-alpha.0.20221019161256-4b326c0c823a/go.mod h1:WBOPlvZkJ1qXW5HINQiNxgWTEm5THpkPy8iHXNkYnRY=
github.com/TBD54566975/ssi-sdk v0.0.1-alpha.0.20221019200812-2e73f0ac7722 h1:aDCoimfCRlAcFCYo3XUiYmavv39VXf45xX2eLrTgmtA=
github.com/TBD54566975/ssi-sdk v0.0.1-alpha.0.20221019200812-2e73f0ac7722/go.mod h1:WBOPlvZkJ1qXW5HINQiNxgWTEm5THpkPy8iHXNkYnRY=
github.com/ardanlabs/conf v1.5.0 h1:5TwP6Wu9Xi07eLFEpiCUF3oQXh9UzHMDVnD3u/I5d5c=
github.com/ardanlabs/conf v1.5.0/go.mod h1:ILsMo9dMqYzCxDjDXTiwMI0IgxOJd0MOiucbQY2wlJw=
github.com/buger/jsonparser v1.1.1 h1:2PnMjfWD7wBILjqQbt530v576A/cAbQvEW9gGIpYMUs=
github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0=
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
Expand All @@ -14,6 +26,8 @@ github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0 h1:HbphB4TFFXpv7MNrT52FGrrgVXF1
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0/go.mod h1:DZGJHZMqrU4JJqFAWUS2UO1+lbSKsdiOoYi9Zzey7Fc=
github.com/dimfeld/httptreemux/v5 v5.4.0 h1:IiHYEjh+A7pYbhWyjmGnj5HZK6gpOOvyBXCJ+BE8/Gs=
github.com/dimfeld/httptreemux/v5 v5.4.0/go.mod h1:QeEylH57C0v3VO0tkKraVz9oD3Uu93CKPnTLbsidvSw=
github.com/flowstack-com/jsonschema v0.1.2 h1:qO2Ed0OHxY88yqqfNwUGfWxF64rVQCdbJ68lmlHSIXs=
github.com/flowstack-com/jsonschema v0.1.2/go.mod h1:Ce82M1ocyTfow5soqyAcHShvlSUqM8odW0UZVIIK4pQ=
github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0=
github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
Expand Down Expand Up @@ -67,8 +81,8 @@ github.com/multiformats/go-base36 v0.1.0 h1:JR6TyF7JjGd3m6FbLU2cOxhC0Li8z8dLNGQ8
github.com/multiformats/go-base36 v0.1.0/go.mod h1:kFGE83c6s80PklsHO9sRn2NCoffoRdUUOENyW/Vv6sM=
github.com/multiformats/go-multibase v0.1.1 h1:3ASCDsuLX8+j4kx58qnJ4YFq/JWTJpCyDW27ztsVTOI=
github.com/multiformats/go-multibase v0.1.1/go.mod h1:ZEjHE+IsUrgp5mhlEAYjMtZwK1k4haNkcaPg9aoe1a8=
github.com/multiformats/go-multicodec v0.6.0 h1:KhH2kSuCARyuJraYMFxrNO3DqIaYhOdS039kbhgVwpE=
github.com/multiformats/go-multicodec v0.6.0/go.mod h1:GUC8upxSBE4oG+q3kWZRw/+6yC1BqO550bjhWsJbZlw=
github.com/multiformats/go-multicodec v0.7.0 h1:rTUjGOwjlhGHbEMbPoSUJowG1spZTVsITRANCjKTUAQ=
github.com/multiformats/go-multicodec v0.7.0/go.mod h1:GUC8upxSBE4oG+q3kWZRw/+6yC1BqO550bjhWsJbZlw=
github.com/multiformats/go-varint v0.0.6 h1:gk85QWKxh3TazbLxED/NlDVv8+q+ReFJk7Y2W/KhfNY=
github.com/multiformats/go-varint v0.0.6/go.mod h1:3Ls8CIEsrijN6+B7PbrXRPxHRPuXSrVKRY101jdMZYE=
github.com/oliveagle/jsonpath v0.0.0-20180606110733-2e52cf6e6852 h1:Yl0tPBa8QPjGmesFh1D0rDy+q1Twx6FyU7VWHi8wZbI=
Expand Down Expand Up @@ -120,6 +134,8 @@ golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0
golang.org/x/crypto v0.0.0-20220427172511-eb4f295cb31f/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
golang.org/x/crypto v0.0.0-20221005025214-4161e89ecf1b h1:huxqepDufQpLLIRXiVkTvnxrzJlpwmIWAObmcCcUFr0=
golang.org/x/crypto v0.0.0-20221005025214-4161e89ecf1b/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2 h1:CIJ76btIcR3eFI5EgSo6k1qKw9KJexJuRLI9G7Hp5wE=
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/sys v0.0.0-20200923182605-d9f96fdee20d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
Expand Down
Loading

0 comments on commit 3d69f57

Please sign in to comment.