Spring Boot REST API authentication best practices using JWT
1. Overview
In this tutorial, I will explain how you can implement production-ready, token-based REST API authentication using JWT (JSON Web Tokens). Further, we will use these tokens to identify our acting user in an HTTP request to our API. For thi...
blog.iamprafful.com4 min read
Saurabh Singh
noob dev
Thanks for the detailed blog I learned a lot. I have only 1 doubt in our JWTFilter implementation.
usernamePasswordAuthenticationToken .setDetails(new WebAuthenticationDetailsSource() .buildDetails(request)); SecurityContextHolder .getContext() .setAuthentication(usernamePasswordAuthenticationToken);I am not able to understand what these two lines are doing can you explain.