[keycloak-user] Tomcat with 2 application

Henk Laracker Henk.Laracker at planonsoftware.com
Mon Apr 20 15:02:58 EDT 2015


Carlos,

If you search in the maillist, you will see that there is a bug in keycloak which has to with cors, we are waiting for a fix.

Regards,
Henk


From: Carlos Feria <carlosthe19916 at gmail.com<mailto:carlosthe19916 at gmail.com>>
Date: Monday 20 April 2015 17:19
To: Henk Laracker <henk.laracker at planonsoftware.com<mailto:henk.laracker at planonsoftware.com>>
Subject: Re: [keycloak-user] Tomcat with 2 application

Hello, i have the same problem as you, could you solve your problem? please tell me hoy you solve your problem with No 'Access-Control-Allow-Origin'

2015-04-12 11:35 GMT-05:00 Henk Laracker <Henk.Laracker at planonsoftware.com<mailto:Henk.Laracker at planonsoftware.com>>:
Hi,

I have a tomcat 7 running with two web applications deployed , called ROOT and web client. I created a realm in keycloak and two applications. Configures tomcat with the correct json files. When I log in in Root it works fine, when I login in web client it works fine. But the following is the case. Both application are not owned by my , so I can not change the code. I login in ROOT, this application connects to web client through a rest call, this restcall results in a redirect to keycloak because I’m not logged in. the result of this is :
XMLHttpRequest cannot load https://keycloak-accdev.planoncloud.com/auth/realms/auth/protocol/openid-co…atorDataService&state=10%2Ff14baad8-c385-4221-b86a-0ac2f0cf8d6a&login=true. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://auth-proddev.planoncloud.com' is therefore not allowed access.
I know that this has something todo with CORS, so I added  the settings:

"enable-cors" : true,
"cors-max-age" : 1000,
"cors-allowed-methods" : "POST, PUT, DELETE, GET”,

To the json file. And added the keycloak url to web origin of both apps in the keycloak manager, but still I got the same result. What do I do wrong? Please advice.

Henk

_______________________________________________
keycloak-user mailing list
keycloak-user at lists.jboss.org<mailto:keycloak-user at lists.jboss.org>
https://lists.jboss.org/mailman/listinfo/keycloak-user



--
Carlos E. Feria Vila
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/keycloak-user/attachments/20150420/6d065f54/attachment.html 


More information about the keycloak-user mailing list