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

Add support customizing the serverLogoutSuccessHandler for OidcClientInitiatedServerLogoutSuccessHandler #14808

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

franticticktick
Copy link
Contributor

Closes gh-14778

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Mar 27, 2024
@jzheaux jzheaux added in: oauth2 An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose) status: blocked An issue that's blocked on an external project change and removed status: waiting-for-triage An issue we've not yet triaged labels Apr 1, 2024
@jzheaux jzheaux self-assigned this Apr 1, 2024
Copy link
Contributor

@jzheaux jzheaux left a comment

Choose a reason for hiding this comment

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

Thanks, @CrazyParanoid! I've left my feedback inline.

*/
public static class RedirectUriParameters {

private ServerWebExchange serverWebExchange;
Copy link
Contributor

Choose a reason for hiding this comment

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

Please have these be final and in the constructor

Copy link
Contributor Author

@franticticktick franticticktick Apr 19, 2024

Choose a reason for hiding this comment

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

I can add final to the class, but I'm not sure if it's worth making all the fields final and initializing them in the constructor. The DefaultRedirectUriResolver requires two attributes Authentication and ServerWebExchange and this attributes are passed to the onLogoutSuccess method, meaning they cannot be null, so they can be made final and added to the constructor, ClientRegistration will be found in the resolver (OidcClientInitiatedServerLogoutSuccessHandler. this.clientRegistrationRepository::findByRegistrationId). That is, it cannot be declared final and required to be initialized in the constructor. I can easily pass it via setter if I need another one ClientRegistration:

this.handler.setRedirectUriResolver((params) -> {
			params.setClientRegistration(ClientRegistration.withRegistrationId("clientId")
					.build());
			return Mono.just("URL");});

@jzheaux jzheaux added type: enhancement A general enhancement and removed status: blocked An issue that's blocked on an external project change labels Apr 25, 2024
@jzheaux jzheaux added this to the 6.4.0-M1 milestone Apr 26, 2024
@marcusdacoregio marcusdacoregio modified the milestones: 6.4.0-M1, 6.4.0-M2 Jul 15, 2024
@sjohnr sjohnr modified the milestones: 6.4.0-M2, 6.4.0-M3 Aug 19, 2024
@marcusdacoregio marcusdacoregio modified the milestones: 6.4.0-M3, 6.4.0-M4 Aug 22, 2024
@jzheaux jzheaux modified the milestones: 6.4.0-M4, 6.4.0-RC1 Sep 16, 2024
@jzheaux jzheaux removed this from the 6.4.0-RC1 milestone Oct 14, 2024
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.

Support customizing the redirect URL in OidcClientInitiatedServerLogoutSuccessHandler
5 participants