-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
base: main
Are you sure you want to change the base?
Conversation
24bae67
to
cb06ab0
Compare
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, @CrazyParanoid! I've left my feedback inline.
*/ | ||
public static class RedirectUriParameters { | ||
|
||
private ServerWebExchange serverWebExchange; |
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.
Please have these be final
and in the constructor
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.
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");});
...rity/oauth2/client/oidc/web/server/logout/OidcClientInitiatedServerLogoutSuccessHandler.java
Outdated
Show resolved
Hide resolved
cb06ab0
to
6639468
Compare
Closes gh-14778