A custom OIDC protocol mapper that maps group id(s) to token claim(s).
mvn clean install
Copy the resulting jar file to Keycloak's providers directory.
For example:
cp target/GroupIdProtocolMapper-1.0-SNAPSHOT.jar /opt/keycloak/providers/
- See Keycloak's built-in protocol mappers for more examples on how to write a protocol mapper.