Seems like a simple scenario, but I can't figure it out: I have an
instance of the KeycloakSession and I want to get the UserModel for the
current request. Is this possible?
Context: I'm creating a custom REST service that runs inside keycloak
and needs to get some data that is related to the current authenticated
user. For instance the realm and client I can get through the
session.getContext().getClient/Realm(). I would expect a getUser() there
too, but I can't find it anywhere 'in' the session.
If this isn't possible, shouldn't it be? Or if not, why not?