I was able to get the username by using:
@Autowired
private HttpServletRequest request;
Principal user = request.getUserPrincipal();
mqMessage.setUserName(user.getName());
But I want to get the firstName & lastName of the user logged in. How can i get the ff. userinfo using SpringBoot keycloak adapter?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With