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: builder pattern for id_token and response #26

Merged
merged 30 commits into from
Jun 7, 2023
Merged

Conversation

nanderstabel
Copy link
Collaborator

@nanderstabel nanderstabel commented May 30, 2023

Description of change

  • Builder pattern for IdToken
  • Builder pattern for Response
  • Rename SiopRequest and SiopResponse to AuthorizationRequest and AuthorizationReponse

Moved (and improved) builder_fn! and parse_other to lib.rs since they can be reused for multiple builders and structs.

Links to any relevant issues

#20

How the change has been tested

Multiple unit tests

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 changed the base branch from dev to feat/claims May 30, 2023 10:28
@nanderstabel nanderstabel changed the title feat: builder pattern for id_token, request and response feat: builder pattern for id_token and response May 31, 2023
nanderstabel and others added 27 commits June 5, 2023 21:07
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 base branch from feat/claims to dev June 5, 2023 19:21
@nanderstabel nanderstabel marked this pull request as ready for review June 5, 2023 19:46
daniel-mader
daniel-mader previously approved these changes Jun 7, 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.

Great work! 🥳

src/lib.rs Outdated

#[macro_export]
macro_rules! builder_fn {
( $name:ident, $ty:ty) => {

Choose a reason for hiding this comment

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

Is this whitespace before $name intended? If no, why did fmt not find it?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Oh no not intended, nice catch. Apparently cargo fmt has more difficulties with formatting macros so good to take that into consideration 👍 : rust-lang/rustfmt#8

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