Skip to content

Simple Spring Boot application that uses Keycloak for authentication and authorization

Notifications You must be signed in to change notification settings

dfelski/spring-boot-keycloak-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spring Boot Keycloak Example

Simple Spring Boot application which uses Keycloak for authentication and authorization.

Just run docker-compose up --build to start two containers, one with Keycloak and one with the application itself.

You have to wait a while till Keycloak starts...

We have two URLs here, localhost:8000 is public accessible and localhost:8000/secured is secured. You will be redirected to Keycloak to authenticate yourself before you're able to access it. You can register an account on demand. That's all.

Due to the fact that both, the client (your browser) and the back end application have to resolve the keycloak-dev host you have to add the host name keycloak-dev to your /etc/hosts on Linux or respective %windir%\system32\drivers\etc\hosts on Windows. There are a lot of much more complicated solutions, I like this one ;)

About

Simple Spring Boot application that uses Keycloak for authentication and authorization

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published