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

Preserve already existing query params in callback url when fragment response mode is used. #2158

Conversation

anjuchamantha
Copy link
Contributor

@anjuchamantha anjuchamantha commented Sep 6, 2023

Callback url can have query params in it. Currently when fragment response mode is used, those query params are also being sent as fragments. Ideally the existing query params should be there in the redirect url as query params eventhough the response mode is fragment. This PR fixes this issue wso2/product-is#16668

This PR also removes code duplication in OAuth2AuthzEndpointTest unit tests introduced by #2037.

@jenkins-is-staging
Copy link

PR builder started
Link: https://github.com/wso2/product-is/actions/runs/6259167324

String.join("&", queryParams));

redirectUrl = redirectUrl.replace("?", "#");
redirectUrl += "#" + String.join("&", queryParams);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Need to add unit tests & change the queryParams name to params

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed with later commits.

@jenkins-is-staging
Copy link

PR builder completed
Link: https://github.com/wso2/product-is/actions/runs/6259167324
Status: success

Copy link

@jenkins-is-staging jenkins-is-staging left a comment

Choose a reason for hiding this comment

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

Approving the pull request based on the successful pr build https://github.com/wso2/product-is/actions/runs/6259167324

@jenkins-is-staging
Copy link

PR builder started
Link: https://github.com/wso2/product-is/actions/runs/6432401485

@jenkins-is-staging
Copy link

PR builder completed
Link: https://github.com/wso2/product-is/actions/runs/6432401485
Status: success

Copy link

@jenkins-is-staging jenkins-is-staging left a comment

Choose a reason for hiding this comment

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

Approving the pull request based on the successful pr build https://github.com/wso2/product-is/actions/runs/6432401485

@janakamarasena janakamarasena merged commit 83f4cc0 into wso2-extensions:master Oct 9, 2023
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.

3 participants