This token mapper allows for the mapping of user group data into the token. It includes granular control of what properties from the group object you want to map.
Installation of the plugin consists of obtaining the .jar
file and doing
one of the following:
- Quarkus - copy the
.jar
into yourproviders
directory. - WildFly - copy the
.jar
into yourstandalone/deployments
directory.
Then rebuild/restart keycloak.
Each GitHub release has the build artifact uploaded to it. You can manually download it and install it by going to the Release and downloading the artifact.
If you want to automate it you can do the following:
export VERSION=some_version
wget "https://github.com/5-stones/keycloak-group-tokenmapper/releases/download/v$VERSION/com.weare5stones.keycloak.tokenmapper-group-$VERSION.jar"
Or in your Dockerfile
:
ENV TOKEN_MAPPER_VERSION=some_version
ADD --chown=keycloak:keycloak \
"https://github.com/5-stones/keycloak-group-tokenmapper/releases/download/v$TOKEN_MAPPER_VERSION/com.weare5stones.keycloak.tokenmapper-group-$TOKEN_MAPPER_VERSION.jar" \
/opt/keycloak/providers/
NOTE: ADD
is used above as modern quay.io:keycloak\keycloak
base images
don't have a package manager bundled with them.
- Clone the repository
- From the root of the repository run:
mvn clean install
The built .jar
will be available in the root of the target
folder.
The standard release command for this project is:
yarn version
This command will:
- Generate/update the Changelog
- Bump the package version
- Tag & pushing the commit
e.g.
yarn version --new-version 1.2.17
yarn version --patch // 1.2.17 -> 1.2.18
Why are we using yarn on a Java project? Because we have standard tooling around
Changelog generation and release based around commitizen
and
conventional-changelog
. And we do what we want.
See the contributing guide to learn how to contribute to the repository and the development workflow.