// get Authentication Context Authentication authentication = SecurityContextHolder.getContext().getAuthentication(); // Get user name authentication.getName()