GithubHelp home page GithubHelp logo

pask423 / keycloak-springboot Goto Github PK

View Code? Open in Web Editor NEW
12.0 2.0 13.0 34 KB

A common repository for all my articles regarding Keycloak and Spring Boot

Home Page: https://dzone.com/articles/spring-boot-3-keycloak

License: Apache License 2.0

Shell 7.60% Java 92.40%
java keycloak secuirty spring spring-boot

keycloak-springboot's Introduction

Info

A common repository for Keycloak and Spring Boot article series

  1. Base integration:
    1. article:
      1. Medium
      2. Dzone
    2. code
  2. Base integration with Spring Boot 3:
    1. article:
      1. Medium
      2. Dzone
    2. code

Running locally

Keycloak

If you only want to use preconfigured Keycloak instance just run the run-keycloak.sh script. It will run the Keycloak docker image with the configuration described in the article.
Keycloak realm configuration is present in realm/realm.json file. All additional configuration and customization can be done from there.

Keycloak and Spring Boot

To set up this environment locally just run the deploy.sh script in one of the project directories. It will compile the application and prepare a runnable jar. Then script will run the jar alongside Keycloak docker.

Testing locally

Directory http contains a set of requests in the form of base.http file for IntelliJ build-in HTTP client.

Requests:

  1. GET http://localhost:8080/hello
  2. POST http://localhost:8090/realms/demo/protocol/openid-connect/token

The request allow for manual testing of the running application.

Only after calling the token request the hello request will return the 200 HTTP code. The first call of a hello request should return a 401 HTTP code.

keycloak-springboot's People

Contributors

pask423 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

keycloak-springboot's Issues

Too many redirects

When I try to access http://localhost:8080/hello, I get an error page:

This page isn’t working
localhost redirected you too many times.
Try clearing your cookies.
ERR_TOO_MANY_REDIRECTS

Do you have any idea how to fix this? I did clear the cookies but to no avail.
Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.