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

Refactor oauth2 Experiment module Implementation #191

Merged
merged 18 commits into from
Jul 8, 2023

Conversation

freizl
Copy link
Owner

@freizl freizl commented Jun 14, 2023

Changes

  • Remove data type GrantTypeFlow, rather make concret type for each grant type.
    See hoauth2/src/Network/OAuth2/Experiment/GrantType/ folder.

  • Split type class for each flow into its own file and simplify the instance implementation a little bit.
    See hoauth2/src/Network/OAuth2/Experiment/Flows folder

    • The type class is responsible for translate different GrantType Application into flow request body
    • There are separated ConduitXXXRequest stitch them together.
  • Separate IDP from Application.

  • IdpApplication is common data type instead of data family, which stiches IDP and grant type Applications.

Notes

The impact to user who are using hoauth2-provider package seems minimal.
See this diff for reference. (Changes to hoauth2-providers-tutorial/src/HOAuth2ProvidersTutorial.hs file)

Further work

  • hoauth2-demo cache enhancement
    Is there way to init all different Apps (AuthCode, ResourceOwnerPassword, ClientCreditials) into one cache?

@freizl freizl force-pushed the refactor/oauth2-experiment branch from 287fbe0 to eda7898 Compare June 27, 2023 04:48
@freizl freizl marked this pull request as ready for review June 27, 2023 05:05
@freizl freizl mentioned this pull request Jun 27, 2023
@freizl
Copy link
Owner Author

freizl commented Jun 27, 2023

Hi @ocramz, since you had some experience at using the Experiment module, would you like take a look at this refactor and add any feedback you may have? Thanks in advance.

@freizl freizl changed the title Refactor/oauth2 experiment Refactor oauth2 Experiment module Implementation Jun 27, 2023
@freizl freizl merged commit f309749 into main Jul 8, 2023
7 checks passed
@freizl freizl deleted the refactor/oauth2-experiment branch July 27, 2023 05:05
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.

1 participant