I am using Shinyproxy with Keycloak and read the username with
userName <- Sys.getenv("SHINYPROXY_USERNAME")
Unfortunately I receive a concatenation of FirstName and LastName, which is not unique.
I would like to have the username in SHINYPROXY_USERNAME. Is this a Keycloak configuration issue?
From documentation
in the default keycloak token mapping
preferred_username
is the username of the keycloak user.So set in your
application.yml
If this does not work, you can always remove existing token mappers for
name
(a few token mappers a pre defined in client_scopes) and create a token mapper with the following configNow Keycloak tokens will contain a attribute
name
with the value of usersusername