thomasdarimont / embedded-spring-boot-keycloak-server

Keycloak JAX-RS application embedded in a Spring-Boot App.
Apache License 2.0
285 stars 111 forks source link

Beginner question: how to deploy the keycloak authenticator example? #21

Open lgonzalezluna opened 4 years ago

lgonzalezluna commented 4 years ago

Hi,

The title says it all: I want to try the keycloak authenticator example but I am not sure how to deploy it to this keycloak.

The authenticator instructions say keycloak must be running and I only need to mvn clean install wildfly:deploy but that command fails with error java.net.ConnectException: WFLYPRT0053: Could not connect to remote+http://localhost:9990

netmikey commented 4 years ago

Are you sure you're asking in the right Github repo? This project is about running Keycloak on Spring Boot. Seeing wildfly:deploy in your post, it seems you've taken a wrong turn somewhere(?)

lgonzalezluna commented 4 years ago

I asked here because it's not clear (to me, anyways) how to deploy those examples on this integration. I didn't expect wildfly:deploy to succeed but had nothing else to try.

So the Tomcat equivalent should be supported, in principle?

netmikey commented 4 years ago

You might want to have a look at the two example projects contained in this repository.

Keep in mind though that this project is still pretty young. So for now, you'll have to clone the repository and build the required Spring modules yourself. I've done it myself, it is a bit of work to get the build set up, but all the bits and pieces to get KC up and running are there.

Hope this helps!

[Update] Things have evolved: using jitpack.io, it is possible to use this project without the need to clone and build this repository. Have a look at this gist: https://gist.github.com/thomasdarimont/7f9fb18c5176f6364fbbb13f5e7cd214

The next release will allow you to specify only the keycloak properties you really want to customise in your application.yml as it will ship with default values for all keycloak-related configuration settings.

This should significantly reduce the effort needed to get started.