Q:

get username from jwt token request spring boot

UserDetails userDetails = (UserDetails) SecurityContextHolder.getContext().getAuthentication()
                        .getPrincipal();
String username = userDetails.getUsername();
1

New to Communities?

Join the community