-
Notifications
You must be signed in to change notification settings - Fork 6k
Add baseScheme, baseHost, basePort and basePath to the post_logout_redirect_uri #11229
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
Conversation
@MPriess Please sign the Contributor License Agreement! Click here to manually synchronize the status of this Pull Request. See the FAQ for frequently asked questions. |
@MPriess Thank you for signing the Contributor License Agreement! |
Thanks for the suggestion, @MPriess. I'd prefer to keep the API as simple as possible. Do you have a need for this support? If not, I think we leave it until someone asks for it and close the PR. |
I run my application behind a reverse proxy and have some trouble with the basePath. That was the inital reason for the change. |
@MPriess, thanks for the extra detail. And sorry for my delayed response. Am I understanding correctly that the reason you would like to use Since you are using a reverse proxy, I'm wondering if you've already tried using |
I want to exclude the context path for all URLs which are generated by Spring Security. e.g. setPostLogoutRedirectUri("https://{baseHost}{basePort}/signout-callback-oidc") Why? I tried it with NGINX and the ForwardedHeaderFilter and it works, but lead to an other problem in my case:
If I'm using the ForwardedHeaderFilter (X-Forwarded-Prefix) the context path is gone. This is a problem, because an other servlet provided by a 3rd party software vendor need the context path. If you say this feature is helpful for other customers I can continue to work on the feature. Not sure if this is an edge case which affect only me. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @MPriess! I've left some feedback inline. Also would you please format the commit message to meet the contribution guidelines?
Specifically, it would be helpful to have it be something like this:
Add placeholders to post_logout_redirect_uri
Now supports baseScheme, baseHost, basePort, and basePath in addition
to extant baseUrl and registrationId support.
Issue gh-6900
Having a short title and linking to the related issue makes future maintenance easier.
...ramework/security/oauth2/client/oidc/web/logout/OidcClientInitiatedLogoutSuccessHandler.java
Outdated
Show resolved
Hide resolved
...ramework/security/oauth2/client/oidc/web/logout/OidcClientInitiatedLogoutSuccessHandler.java
Outdated
Show resolved
Hide resolved
Hi, @MPriess. Are you able to make the requested changes and fix the build errors? |
Yes, sure! |
Now supports baseScheme, baseHost, basePort, and basePath in addition to extant baseUrl. Issue spring-projectsgh-11229
@jzheaux Done |
Now also supports baseScheme, baseHost, basePort, and basePath Issue gh-11229
Thanks, @MPriess, this is now merged into |
Now supports baseScheme, baseHost, basePort, and basePath in addition to extant baseUrl. Closes gh-11229
Now also supports baseScheme, baseHost, basePort, and basePath Issue gh-11229
For redirects it's possible to pass a redirect URI template (gh-6900) which support baseScheme, baseHost, basePort and basePath.
The current implementation of OidcClientInitiatedLogoutSuccessHandler only support the baseUrl. To make the API and usage more consistent I suggest to provide this options too for the post_logout_redirect_uri.
I renamed one existing testcase and added two additional testcases for the new parameters.
References:
gh-6900