This example project uses the OpenID Connect support in Spring Security 5 without using the Keycloak adapter
and is inspired by this blog post by Michael Simons.
Features:
- SSO / SLO
- Support for extracting roles from Keycloak AccessToken
- Link to Keycloak Account page with back-link to the application
Import the demo
realm into Keycloak via
bin/standalone.sh -Dkeycloak.migration.action=import
-Dkeycloak.migration.provider=singleFile -Dkeycloak.migration.file=/path/to/demo-realm.json
-Dkeycloak.migration.strategy=OVERWRITE_EXISTING
Keycloak is assumed to run on port 8080 on localhost.
The demo realm contains two users tester
and admin
both with password test
.
The example runs on port 8082.