Minimal working example of Spring Boot web app with OAuth 2.0, Keycloak. All MicroServices run on Docker Compose.
- Add the following line to file
/etc/hosts
(on Linux) orC:/Windows/System32/drivers/etc/hosts
(on Windows):127.0.0.1 keycloak
- Run the
startAll.sh
orrestartAll.sh
- When all services are running, in the browser go to:
http://localhost:8072/ui
- Use default user:
test:test
- To log out use this endpoint:
http://localhost:8072/logout
docker ps
docker exec -it [container with Keycloak] bash
cd /opt/keycloak
bin/kc.sh export --dir . --realm Test_realm --users realm_file
# View
ls -all
cat Test_realm-realm.json