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

Feat: support multiple did's and oid4vc-manager #28

Merged
merged 58 commits into from
Jun 21, 2023
Merged

Conversation

nanderstabel
Copy link
Collaborator

@nanderstabel nanderstabel commented Jun 6, 2023

Description of change

  • Renamed Registration to ClientMetadata following the 11th siopv2 spec adjustment: https://openid.bitbucket.io/connect/openid-connect-self-issued-v2-1_0.html#name-document-history
  • Migrated some methods of Provider and RelyingParty to their respective "managers" in oid4vc-manager crate.
  • Migrated did:key and did:iota to the oid4vc-manager crate. (the did iota method still has a slow unit test. This will be solved once we have the "mock" repo with different persona's.
  • Refactored the trait system. At least for now Subject is the main trait which both the Provider and the RelyingParty will use. Subject has both Verify (prev. Validator) and Sign as trait bounds as well as the Sync and Send marker traits. Strictly speaking a RelyingParty (as well as issuer) don't need to have a Subject for signing and verifying requests/responses. Therefore I already added the Validator enum with variants Subject and Verifier.
  • Added first integration test for the implicit flow in in the oid4vc-manager crate.
  • Added the Decoder struct. This struct can be passed to both RelyingParty and Provider to validate either a response or a request. It uses it's Validators to try to decode a given jwt. The benefit of this implementation is that multiple Validator's can be used to verify a jwt that can be either Subject or Verify.
  • Added SubjectSyntaxTypes and DidMethod according to https://openid.bitbucket.io/connect/openid-connect-self-issued-v2-1_0.html#name-subject-syntax-types

Links to any relevant issues

Closes #3

How the change has been tested

Bunch of unit-tests and one integration test in oid4vc-manager

Definition of Done checklist

Add an x to the boxes that are relevant to your changes.

  • I have followed the contribution guidelines for this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

nanderstabel and others added 30 commits June 11, 2023 22:32
Add tests for RequestUrl

Add missing request parameters

Add sphereon demo website test

Update documentation with new RequestUrl

Remove sphereon demo example

Add validate_request method to Provider struct

Add preoper Ser and De for SiopRequest and RequestBuilder

Add skeptic for Markdown code testing

Add support for Request by reference

fix: fix rebase conflicts

Add comments and fix some tests

fix: Move `derivative` to dev-dependencies

Refactor Provider and Subject

improve tests and example using wiremock

Improve struct field serde

fix: remove claims from lib.rs

style: fix arguments order

Add did:key DID method

Add support for Request by reference

fix: Remove lifetime annotations

Add preoper Ser and De for SiopRequest and RequestBuilder

Add Scope and Claim

fix: fix rebase conflicts
Add tests for RequestUrl

Add missing request parameters

Add sphereon demo website test

Update documentation with new RequestUrl

Remove sphereon demo example

Add validate_request method to Provider struct

Add preoper Ser and De for SiopRequest and RequestBuilder

Add skeptic for Markdown code testing

Add support for Request by reference

fix: fix rebase conflicts

Add comments and fix some tests

fix: Move `derivative` to dev-dependencies

Refactor Provider and Subject

improve tests and example using wiremock

Improve struct field serde

fix: remove claims from lib.rs

style: fix arguments order

Add did:key DID method

Add support for Request by reference

fix: Remove lifetime annotations

Add preoper Ser and De for SiopRequest and RequestBuilder

Add Scope and Claim

fix: fix rebase conflicts
@nanderstabel nanderstabel changed the title Feat/multi did Feat: support multiple did's and oid4vc-manager Jun 19, 2023
@nanderstabel nanderstabel marked this pull request as ready for review June 19, 2023 12:04
@daniel-mader daniel-mader self-requested a review June 19, 2023 19:18
daniel-mader
daniel-mader previously approved these changes Jun 20, 2023
Copy link

@daniel-mader daniel-mader left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 🥳

dif-presentation-exchange/Cargo.toml Outdated Show resolved Hide resolved
oid4vci/Cargo.toml Outdated Show resolved Hide resolved
oid4vp/Cargo.toml Outdated Show resolved Hide resolved
siopv2/Cargo.toml Outdated Show resolved Hide resolved
siopv2/src/relying_party.rs Outdated Show resolved Hide resolved
oid4vc-manager/Cargo.toml Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for multiple Subject Syntax Types
2 participants