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: improved builder pattern for RequestUrl #27

Merged
merged 35 commits into from
Jun 9, 2023
Merged

Conversation

nanderstabel
Copy link
Collaborator

@nanderstabel nanderstabel commented May 31, 2023

Description of change

#26 should be merged first.

Added RequestObject variant to RequestUrl enum. The three variants of the enum now reflect the 3 possible ways to transfer authorization request parameters with the Provider:

  1. RequestUrl::Request: All request parameters are directly represented via an AuthorizationRequest
  2. RequestUrl::RequestUri: The request parameters are encoded into a Request Object (JWT) and hosted at an endpoint. The only parameters that are initially transferred to the provider are client_id and request_uri, which represents the endpoint wher the provider can obtain the actual Request Object.
  3. RequestUrl::RequestObject: In this case, the actual request parameters are also encoded into a Request Object (JWT), but now this JWT is directly transferred to the provider as a value for the request parameter alongside the client_id parameter.

More info: https://www.rfc-editor.org/rfc/rfc9101.html#section-5

Links to any relevant issues

#19

How the change has been tested

Adjusted some existing unit-tests that relied on RequestBuilder
Added test_valid_request_object unit test.

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 nanderstabel force-pushed the feat/requestbuilder branch 2 times, most recently from f44f865 to 7a0644b Compare June 5, 2023 20:49
@nanderstabel nanderstabel changed the base branch from feat/builders to dev June 6, 2023 07:03
@nanderstabel nanderstabel changed the title feat: requestbuilder feat: improved builder pattern for RequestUrl Jun 6, 2023
@nanderstabel nanderstabel changed the base branch from dev to feat/builders June 6, 2023 07:06
@nanderstabel nanderstabel marked this pull request as ready for review June 6, 2023 07:30
@nanderstabel nanderstabel changed the base branch from feat/builders to dev June 6, 2023 07:31
daniel-mader
daniel-mader previously approved these changes Jun 9, 2023
nanderstabel and others added 19 commits June 9, 2023 18:01
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 and others added 16 commits June 9, 2023 18:02
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 merged commit a81b8c2 into dev Jun 9, 2023
@nanderstabel nanderstabel deleted the feat/requestbuilder branch December 14, 2023 08:50
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.

2 participants