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 OAuth2LoginSpec.authenticationSuccessHandler #6863

Closed
rexave opened this issue May 13, 2019 · 3 comments

Comments

@rexave
Copy link

commented May 13, 2019

In imperative spring security configuration, we can customize the successHandler of an oAuth2Login configuration with
org.springframework.security.config.annotation.web.configurers.AbstractAuthenticationFilterConfigurer#successHandler

I didn't find this feature in reactive branch of spring security on org.springframework.security.config.web.server.ServerHttpSecurity#oauth2Login

Version

spring security 5.1.5

Can you port this feature in reactiv implementation ?
How can I change the behavior of spring security after a successful oAuth ?
Maybe with a org.springframework.security.config.web.server.ServerHttpSecurity#addFilterAt ? But how can i know the authentication was successful ?

@rwinch rwinch changed the title Support successHandler customization in oauth2Login reactive builder Add OAuth2LoginSpec.authenticationSuccessHandler May 15, 2019

@rwinch

This comment has been minimized.

Copy link
Member

commented May 15, 2019

This sounds like a reasonable enhancement request. Would you be interested in submitting a Pull Request?

As you mentioned you can work around this using addFilterAt. See

for what needs to be done

@dnl50

This comment has been minimized.

Copy link
Contributor

commented May 31, 2019

I would like to submit a pull request in case @rexave is not interested!

dnl50 added a commit to dnl50/spring-security that referenced this issue May 31, 2019

Add success handler modification of OAuth2LoginSpec
Add the ability to modify the success handler used in OAuth2LoginSpec. The
default success handler remains unchanged.

Closes spring-projects#6863
@rexave

This comment has been minimized.

Copy link
Author

commented Jun 2, 2019

of course @dnl50
Your help is appreciated :) I didn't had the time lately =]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.