"User create" and "register" events, listen and Call Rest API with Java
git clone https://github.com/cevheri/keycloak-custom-event-listener
cd keycloak-custom-event-listener
mvn clean package
volumes:
- ../../../target/custom-event-listener.jar://opt/jboss/keycloak/standalone/deployments/custom-event-listener.jar
docker-compose -f src/main/docker/docker-compose.yml up -d
- Open Keycloak Admin Console
- Login with admin user
- Go to "Events" -> "Config" -> "Config" -> "Event Listeners"
- Add "custom-event-listener" to "Event Listeners"
- Save
- Go to "Users" -> "Add User"
- Fill the form and click "Save"
- Check the API result on MockAPI
Hi-Level API Design
- Our motivation is to call an API when a user is created or registered.
- We will use a mock API for this example.
docker-compose -f src/main/docker/docker-compose.yml down