This mapper is intended for use with Keycloak as a custom protocol mapper. It maps the preferred_username token claim to username@<KC_HOSTNAME> rather than the default username.
-
Install the
.zipfile containing the source code:wget https://github.com/cwhead-globus/preferred-username-mapper/archive/refs/heads/main.zip unzip main.zip rm main.zip -
Install Maven:
sudo apt install maven -
Build the
.jarfile associated with the source code: From inside thepreferred-username-mapper-maindirectory created by unzippingmain.zip, run the following command:mvn clean install -
Move the
target/globus-keycloak-mapper-1.0.jarfile to Keycloak'sproviders/directory.