Skip to content

Commit

Permalink
feat: add support for Linked Verifiable Presentations (#92)
Browse files Browse the repository at this point in the history
* WIP

* feat init agetn_holder

* feat: add `HolderState`

* feat: add Holder functionality to `agent_store` and `agent_api_rest`

* feat: add Holder functionality to Event Publisher

* feat: add `SendCredentialOffer` to `agent_verification`

* feat: add `/offers/send` issuance endpoint to `agent_api_rest`

* fix: remove incorrect Content Type

* feat: add `Status` enum

* feat: add REST API for Holder

* feat: add `AllOffersView`

* feat: add Holder views to `init.sql`

* fix: fix `OfferView` update

* feat: add credentials endpoint for Holder

* refactor: refactor Router

* test: refactor test framework

* refactor: deprecate `path` closure

* refactor: remove unused dependencies

* style: add clippy exception

* build: bump oid4vc dependencies

* refactor: move all `CustomQuery` logic to `agent_shared`

* fix: add Into<SubjectSyntaxType> for SupportedDidMethod

* fix: return 200 OK when list is empty

* refactor: clean up code

* fix: Fix error handling for the Offer aggregate

* fix: add error handling for to Offer aggregate

* refactor: apply clippy suggestion

* test: update Postman Collection

* feat: add Events to `config.rs`

* docs: add new Holder events  to `agent_event_publisher_http` documentation

* feat: init `agent_identity`

* style: use consistent nameing for `View` variables

* style: rename variables

* refactor: use `type` for `View`s to reduce code duplication

* refactor: use `Jwt` instead of `Value`

* feat: add error handling

* fix: remove `presentation_id` from route

* refactor: add error handling and comments

* refactor: remove unused dependencies

* build: remove unused dependencies

* feat: add `UnsupportedCredentialFormatError` error

* test: update Postman Collection

* feat: update `init.sql` file

* feat: add tests and error handling

* feat: add error handling

* test: add unit tests for `Service`, `Presentation` and received `Offer`

* feat: add `GET` method for `/v0/services` endpoint

* test: update Postman collection

* docs: add document, service and presentation events

* fix: remove unused import

* ci: add DS_Store to .gitignore file

* feat: add Document and Service to config.rs

* fix: update .env.example variables

* feat: make `/accept` endpoint respond with the Offer

* feat: change `openid4vci/offers` from GET to POST

* test: add `services/:service_id` endpoints to Postman collection

* fix: change method from `get` to `post`

* feat: add public `/linked-verifiable-presentations` endpoint

* feat: add `offers_params` endpoint handler

* style: make requests human-readable

* test: update path of linked VP in test

* fix: update `did_configuration` comment

* fix: use ACME Corp

* fix: improve error message

* fix: add comment

* fix: remove `/openid4vci/offers` endpoint

* docs: add aggregate fields

* fix: clarify commented env variables
  • Loading branch information
nanderstabel authored Nov 25, 2024
1 parent 16762ac commit 029f1bf
Show file tree
Hide file tree
Showing 79 changed files with 2,554 additions and 579 deletions.
15 changes: 9 additions & 6 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
UNICORE__LOG_FORMAT=text
UNICORE__EVENT_STORE__TYPE=postgres
UNICORE__EVENT_STORE__CONNECTION_STRING="postgresql://demo_user:demo_pass@cqrs-postgres-db:5432/demo"
UNICORE__EVENT_STORE__TYPE=in_memory

UNICORE__SECRET_MANAGER__STRONGHOLD_PATH="agent_secret_manager/tests/res/test.stronghold"
UNICORE__URL="http://localhost:3033"

UNICORE__SECRET_MANAGER__STRONGHOLD_PATH="agent_secret_manager/tests/res/temp.stronghold"
UNICORE__SECRET_MANAGER__STRONGHOLD_PASSWORD="secure_password"
UNICORE__SECRET_MANAGER__ISSUER_EDDSA_KEY_ID="9O66nzWqYYy1LmmiOudOlh2SMIaUWoTS"
UNICORE__SECRET_MANAGER__ISSUER_DID="did:iota:rms:0x42ad588322e58b3c07aa39e4948d021ee17ecb5747915e9e1f35f028d7ecaf90"
UNICORE__SECRET_MANAGER__ISSUER_FRAGMENT="bQKQRzaop7CgEvqVq8UlgLGsdF-R-hnLFkKFZqW2VN0"
# Uncomment to enable DID IOTA for testing purposes
# UNICORE__SECRET_MANAGER__STRONGHOLD_PATH="agent_secret_manager/tests/res/test.stronghold"
# UNICORE__SECRET_MANAGER__ISSUER_EDDSA_KEY_ID="9O66nzWqYYy1LmmiOudOlh2SMIaUWoTS"
# UNICORE__SECRET_MANAGER__ISSUER_DID="did:iota:rms:0x42ad588322e58b3c07aa39e4948d021ee17ecb5747915e9e1f35f028d7ecaf90"
# UNICORE__SECRET_MANAGER__ISSUER_FRAGMENT="bQKQRzaop7CgEvqVq8UlgLGsdF-R-hnLFkKFZqW2VN0"
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@

**/*.env
!**/.env.example

.DS_Store
Loading

0 comments on commit 029f1bf

Please sign in to comment.