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

Allow customization of redirect strategy #11387

Closed
wants to merge 1 commit into from

Conversation

igorbolic
Copy link
Contributor

The default redirect strategy will provide authorization redirect
URI within HTTP 302 response Location header.
Allowing the configuration of custom redirect strategy will provide
an option for the clients to obtain the authorization URI from e.g.
HTTP response body as JSON payload, without a need to handle
automatic redirection initiated by the HTTP Location header.

Closes gh-11373

Copy link
Member

@rwinch rwinch left a comment

Choose a reason for hiding this comment

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

Thank you for the PR @igorbolic

This looks like it will work for reactive support, but we need to ensure that we have consistency with the servlet support as well.

Can you please:

  • Add Support for OAuth2AuthorizationRequestRedirectFilter
  • Ensure to add Java Configuration Support
  • Ensure to add XML configuration support

@igorbolic
Copy link
Contributor Author

Can you please:

* Add Support for OAuth2AuthorizationRequestRedirectFilter

* Ensure to add Java Configuration Support

* Ensure to add XML configuration support

@rwinch I've pushed the requested changes.

Still, there are tests (unrelated to this PR) that are failing, but I've created PR #11462 to address them. I can rebase on top of changes in PR #11462 if/once they are merged to the main branch, just so that all tests pass in green with this PR.

@igorbolic igorbolic force-pushed the gh-11373 branch 2 times, most recently from 54f034c to feb47b2 Compare July 5, 2022 12:02
The default redirect strategy will provide authorization redirect
URI within HTTP 302 response Location header.
Allowing the configuration of custom redirect strategy will provide
an option for the clients to obtain the authorization URI from e.g.
HTTP response body as JSON payload, without a need to handle
automatic redirection initiated by the HTTP Location header.

Closes spring-projectsgh-11373
@igorbolic igorbolic requested a review from rwinch July 6, 2022 12:12
@rwinch rwinch added in: oauth2 An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose) type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged labels Aug 8, 2022
@rwinch rwinch self-assigned this Aug 8, 2022
@rwinch rwinch added this to the 5.8.0-M2 milestone Aug 8, 2022
@rwinch
Copy link
Member

rwinch commented Aug 8, 2022

Thank you for the PR @igorbolic! This has been merged into 5.8.x via efaee4e and main via 2e66b9f

@rwinch rwinch closed this Aug 8, 2022
Copy link
Member

@rwinch rwinch left a comment

Choose a reason for hiding this comment

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

Looks good! Thank you @igorbolic

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: oauth2 An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose) type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add an option to customize ServerRedirectStrategy in the OAuth2AuthorizationRequestRedirectWebFilter
3 participants