In this post, we will re-implement the same features, but use the new Spring WebFlux.
To start a new project, go to http://start.spring.io to generate the project .
select the following requirements to generate the project.
- Reactive Web
To continue on the project it should have the following dependencies in gradle file
Create a TokenProvider class as below
Next, create a
WebFilter to handle the authentication
Now, register this filter in the
.securityContextRepository() will prevent it to create a
WebSession, it is similar with STATELESS strategy
Create a RESTful API to authenticate a user.
All done. Now start the server as gradle bootRun, it should work like before sections
Get al source code from my GITHUB
If you like this page please Buy me a Coffee — https://www.buymeacoffee.com/shareknowlage