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) { ... }
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
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) { ... }