From the course: Spring 6: Spring Security
Unlock this course with a free trial
Join today to access over 25,500 courses taught by industry experts.
Introduction to WebFlux Security
From the course: Spring 6: Spring Security
Introduction to WebFlux Security
- [Instructor] Any modern development in Spring these days requires a reference to WebFlux. WebFlux is the way to do Reactive Spring since 2.0. With Spring Security, there is full support for WebFlux. Let's take a look. The basic annotation that you're going to use is @EnableWebFluxSecurity. This gives you control for basic configuration mapping, and the basic config puts everything as secured. You also have a handle on SecurityWebFilterChain. As you might remember, everything in Spring Security is based on filters and Reactive Spring is no different. The filter chain provides much more fine-grained control, much the way we've seen before in the authentication managers. You also have a MapReactiveUserDetailsService that allows you to have a handle on traditional UserDetailsService, much the same way we have before. And when we get into our example, we're going to go back to that in-memory UserDetailsService. Oftentimes in security, as we have seen, we want to handle the principal, and…