spring-projects / spring-projects/spring-security
Allow extension in OidcClientInitiatedServerLogoutSuccessHandler to provide custom post_logout_redirect_uri
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 9.6k
- Forks
- 6.3k
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 52
Description
Expected Behavior
In spring cloud gateway, it could be the case that there is more frontend applications and each of them wants to have it's own logout page. For this case it would be nice if we can provide a way how to retrieve the post_logout_redirect_uri dynamically. Each frontend application could then send a parameter to the logout page like http://gateway/logout?post_logout_redirect_uri=http://frontend1/after-logout
Current Behavior
Currently it's little bit difficult to override the post_logout_redirect_uri retrieval. The easiest way would be to make method String postLogoutRedirectUri(ServerHttpRequest request, ClientRegistration clientRegistration) protected.
Context
I've created custom redirectUriResolver but with that the session was not terminated.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with OidcClientInitiatedServerLogoutSuccessHandler and its postLogoutRedirectUri(ServerHttpRequest, ClientRegistration) method. Trace how the logout request and redirect URI are handled, including why a custom redirectUriResolver does not terminate the session. Done means a supported extension point can resolve post_logout_redirect_uri dynamically while preserving session termination, with tests covering the behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring
- Domain
- backend, security
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 64/100