Applying security on TaskExecutors
The last recipe for this chapter is essential in building secured reactive and asynchronous Spring MVC applications. This is all about imposing authentication and authorization rules on asynchronous services and controllers using Spring Security 4.2.x.
Getting started
Open ch08
for the last time and apply the security rules based on Spring Security 4.2 security contexts.
How to do it...
This last recipe is an extension of the Spring Security module that is applied to asynchronous services and controllers. Follow these steps on how threads in asynchronous and reactive executions can access the user details at runtime:
- Before this recipe starts, include inside the
pom.xml
all the needed Maven dependencies of Spring Security 4.2.2. Refer to Chapter 4, Securing Spring MVC Applications, recipe ;Applying Aspect-Oriented Programming, for this item. - Create a new package
org.packt.web.reactor.security.config
to contain the Security context definition derived from Chapter...