Skip to content

PoC for Spring Boot 2 + Spring Security 5 + Keycloak 3.4.3 without Keycloak Adapter

Notifications You must be signed in to change notification settings

thomasdarimont/spring-boot-2-keycloak-oauth-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PoC for Spring Boot 2 + Spring Security 5 + Keycloak 3.4.3

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

Setup

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.

About

PoC for Spring Boot 2 + Spring Security 5 + Keycloak 3.4.3 without Keycloak Adapter

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published