loading...

re: Spring Security with JWT VIEW POST

TOP OF THREAD FULL DISCUSSION
re: Hey just wanted to let you know this was sooooo helpful! Thank you for your time and talent at teaching! If anyone else is struggling with the see...
 

also if it helps anyone:

if you want to put the username/id whatever you are storing as the subject in jwt onto the request (so that your secured endpoints know which user is accessing):

in AuthorizationFilter#doFilterInternal(): request.setAttribute("username", authentication.getPrincipal());

in ur controllers: public @RequestBody ReturnType yourMethod(@RequestAttribute("username") String username) { ... }

Code of Conduct Report abuse