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: add ResponseModeHandler to support custom response modes #592

Merged
merged 2 commits into from
Jun 11, 2021

Conversation

narg95
Copy link
Contributor

@narg95 narg95 commented May 3, 2021

Related issue

#591

Proposed changes

This is a draft/preview PR of the proposed change described in issue #591

Status

  • Main functionality is implemented
  • Existing Unit tests pass
  • Missing:
    • Add ResponseModeHandler in compose.Config package
    • Add extra unit test
    • Document public interface and source code

Checklist

  • I have read the contributing guidelines
    and signed the CLA.
  • I have read the security policy.
  • I confirm that this pull request does not address a security
    vulnerability. If this pull request addresses a security vulnerability, I
    confirm that I got green light (please contact
    security@ory.sh) from the maintainers to push
    the changes.
  • [x ] I have added tests that prove my fix is effective or that my feature
    works.
  • [x ] I have added necessary documentation within the code base (if
    appropriate).

@narg95 narg95 changed the title WIP: add ResponseModeHandler to support custom response modes feat: add ResponseModeHandler to support custom response modes May 3, 2021
Copy link
Member

@aeneasr aeneasr left a comment

Choose a reason for hiding this comment

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

I think this is going in the right direction! Would definitely need a few more tests, especially integration tests :)

@narg95
Copy link
Contributor Author

narg95 commented May 17, 2021

sure, bu I was thinking in unit tests, why did you consider integration tests if this change is not integrating with a DB or external processes, or what kind of integration tests you mean? Can you point me in the right direction?

@aeneasr
Copy link
Member

aeneasr commented May 19, 2021

Ah sure, I was thinking of a test in the direction of https://github.com/ory/fosite/blob/master/integration/authorize_form_post_test.go which would use a custom response mode. Does that make sense?

@narg95
Copy link
Contributor Author

narg95 commented May 19, 2021

Sure, makes sense, I will use it as a base

@narg95 narg95 force-pushed the add_response_mode_handler branch from 6680612 to 6b8272f Compare May 25, 2021 18:26
@narg95
Copy link
Contributor Author

narg95 commented May 25, 2021

@aeneasr done!
I added integration tests, at first I copied form_post tests but soon I realized I could better reuse them with some flags so that there is no need to maintain two sets of similar test cases.

Let me know if that would be enough to merge this PR

@narg95 narg95 marked this pull request as ready for review May 25, 2021 18:31
@narg95 narg95 force-pushed the add_response_mode_handler branch from 6b8272f to 21404a2 Compare May 25, 2021 18:32
@aeneasr
Copy link
Member

aeneasr commented May 28, 2021

Once ory/hydra#2526 is merged we can re-run the conformity tests here which should then pass :)

@narg95 narg95 force-pushed the add_response_mode_handler branch from 21404a2 to d586575 Compare May 31, 2021 15:44
@narg95
Copy link
Contributor Author

narg95 commented May 31, 2021

@aeneasr today's merged commits in hydra and fosite seem to work :)
I rebased this branch with latest commits and got OpenID Connect Conformity Tests 🟢 green :)

@narg95 narg95 requested a review from aeneasr May 31, 2021 16:07
Copy link
Member

@aeneasr aeneasr left a comment

Choose a reason for hiding this comment

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

Awesome, thank you for your contribution!

@aeneasr aeneasr merged commit 10ec003 into ory:master Jun 11, 2021
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.

None yet

2 participants