spring boot authorize jwt token after authentication code example
Example: get username from jwt token request spring boot
UserDetails userDetails = (UserDetails) SecurityContextHolder.getContext().getAuthentication()
.getPrincipal();
String username = userDetails.getUsername();