Skip to content

brianbrix/spring-keycloak-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spring Boot/ Keycloak Authorization

  • This is a simple containerized spring boot application to demonstrate usage of Keycloak as Authentication and Authorization server with OpenId Connect protocol

The application is made up of majorly two services:

  1. Keycloak server
  2. Simple Spring Boot REST APIs.

To run the app:

  1. Install docker and docker-compose

  2. Run docker-compose up --build - This will start the keycloak server and the application itself.

  3. Open the keycloak admin panel at This link
  4. Follow the instructions on this link to set up a keycloak realm, role, user and some few other identity specifications:
  • For this app we use the following settings:
  • Realm: test
  • Role: user
  • User: user1
  • Client: SpringBootKeyCloak

To get access_token: Make post request with json credentials to http://localhost:8082/token.

To test the token received: make GET request to http://localhost:8082/api

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published