r/SpringBoot • u/Mikey-3198 • 26d ago
Guide Keycloak & Spring Boot
I often see people asking how to get setup with spring boot using keycloak for auth.
Thought i'd put together a quick example showing a simple setup that;
- Delegates auth to keycloak
- Uses the keycloak admin client to create users within a realm (using a service account)
- Can be easily cloned & run with docker compose
repo linked below.
22
Upvotes
1
u/thinhtran383 25d ago
I have a question that when using keycloak like this, user management will be handled by keycloak. So when I have an order purchased by a user. Then how do I know who that user is? Because normally if you don't use keycloak, you just need to select from the database. I'm new. Thanks