Skip to content

[question] Get logged in users with spring reactive/webflux security #5762

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

Closed
bkolb opened this issue Sep 3, 2018 · 1 comment
Closed

[question] Get logged in users with spring reactive/webflux security #5762

bkolb opened this issue Sep 3, 2018 · 1 comment
Assignees
Labels
for: stackoverflow A question that's better suited to stackoverflow.com

Comments

@bkolb
Copy link

bkolb commented Sep 3, 2018

I am trying to build a small example with the reactive stack of spring. I want to keep track of "active users", how would I do that? ServerHttpSecurity offers a authenticationSuccessHandler for formLogin and a logoutSuccessHandler for logout. But httpBasic seems to offer nothing alike. How would I get notified if a session would time out?
In classic spring I would have used the SessionRegistry and configure it in httpSecurity for that, but that seems to be no longer available in the reactive stack.

@rwinch
Copy link
Member

rwinch commented Sep 4, 2018

The best approach would be to leverage a custom WebSessionStore that allowed additional operations based upon the username. Spring Session is likely the best place for this. I created spring-projects/spring-session#1176 You can reach out on that issue for additional details and discussion if you are interested in contributing a PR

@rwinch rwinch closed this as completed Sep 4, 2018
@rwinch rwinch self-assigned this Sep 4, 2018
@rwinch rwinch added the for: stackoverflow A question that's better suited to stackoverflow.com label Sep 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
for: stackoverflow A question that's better suited to stackoverflow.com
Projects
None yet
Development

No branches or pull requests

2 participants