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
Closed

Add OAuth2LoginSpec.authenticationSuccessHandler #6863

rexave opened this issue May 13, 2019 · 3 comments
Assignees
Labels
in: oauth2 An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose) type: enhancement A general enhancement
Milestone

Comments

@rexave
Copy link

rexave 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 ?

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label May 13, 2019
@rwinch rwinch changed the title Support successHandler customization in oauth2Login reactive builder Add OAuth2LoginSpec.authenticationSuccessHandler May 15, 2019
@rwinch rwinch added in: config An issue in spring-security-config type: enhancement A general enhancement status: ideal-for-contribution An issue that we actively are looking for someone to help us with and removed status: waiting-for-triage An issue we've not yet triaged labels May 15, 2019
@rwinch
Copy link
Member

rwinch 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
Copy link
Contributor

dnl50 commented May 31, 2019

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

dnl50 pushed a commit to dnl50/spring-security that referenced this issue May 31, 2019
Add the ability to modify the success handler used in OAuth2LoginSpec. The
default success handler remains unchanged.

Closes spring-projects#6863
@rexave
Copy link
Author

rexave commented Jun 2, 2019

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

@jgrandja jgrandja added in: oauth2 An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose) and removed in: config An issue in spring-security-config status: ideal-for-contribution An issue that we actively are looking for someone to help us with labels Jun 5, 2019
@jgrandja jgrandja added this to the 5.2.0.M3 milestone Jun 5, 2019
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 a pull request may close this issue.

5 participants