michal-trnka / keycloak_iot

Proof of concept of using Keycloak for IoT authentication
4 stars 2 forks source link

Generation of keycloak.json #2

Open prvsousa opened 6 years ago

prvsousa commented 6 years ago

Hi.

I'm interested in this project, because i want to test the keycloak in the IoT environment. However, I'm stopped in the step 9. because I don't understand what I have to make.

Let's see: I make "mvn install" and I get keycloak.json in the target folder of the iot-hub-example. But what I have to do with these file? import correct keycloak.json (generated in step Keycloak 8) but to where? There are any tutorial that I can follow? Or can you give me some guide for this?

Thanks.

michal-trnka commented 6 years ago

It is already 2 years since I used it so my memory might not be perfect and the keycloak most likely changed as well.

In step #9 you create keycloak.json from keycloak for given realm. Then you import it to the application (replace the one that is already in the application on git) for the adapter. After that you run mvn install. You might consult it with keycloak documentation (http://www.keycloak.org/docs/3.2/securing_apps/topics/oidc/java/java-adapter-config.html#_java_adapter_config)

prvsousa commented 6 years ago

Ok thank you very much.

And you remember these steps?

run wildfly
run comman mvn clean package wildfly:deploy

The command "mvn clean package wildfly:deploy" is to be made in this project? I'm with errors with this.

michal-trnka commented 6 years ago

You don't have to run wildfly:deploy, it just automatically deploys the application to wildfly server. There is artifact in pom file responsible for that magic. As I told, something might have changed over 2 years and I'm not sure if current wildfly supports that functionality.

prvsousa commented 6 years ago

Yeah, it is okay. I'm only getting some hints in order to deploy this test.

Thank you so much for the help!