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
.zip
file 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
.jar
file associated with the source code: From inside thepreferred-username-mapper-main
directory created by unzippingmain.zip
, run the following command:mvn clean install
-
Move the
target/globus-keycloak-mapper-1.0.jar
file to Keycloak'sproviders/
directory.