Marek,
I guess this would work if I can pass Json object to Keycloak constructor.
Is it possible?
Thanks‼
-----------------
Andrey Ryvlin
Principal Software Engineer
Phone: 952-979-8492
5705 W Old Shakopee Road, Suite 100
Bloomington, MN 55437 USA
ARyvlin@MorphoTrust.com<mailto:ARyvlin@MorphoTrust.com>
www.MorphoTrust.com<http://www.morphotrust.com/>
[cid:image003.jpg@01CFF75A.60542BC0]
From: Marek Posolda [mailto:mposolda@redhat.com]
Sent: Thursday, April 02, 2015 1:05 PM
To: Ryvlin, Andrey; keycloak-user(a)lists.jboss.org
Subject: Re: [keycloak-user] keycloak.json file for angular app
Hi,
I guess in your Angular application you're using something like:
var keycloakAuth = new Keycloak('keycloak.json');
right? So instead of this, you can read the Keycloak configuration from some separate URI
like:
var keycloakAuth = new Keycloak('myconfig');
Where the path 'myconfig' could be mapped to some servlet (or jaxrs application if
you prefer), which will return you the JSON with the configuration. So instead of serving
the configuration directly from file keycloak.json, you will serve it from the servlet (or
jaxrs app). The servlet will run on server side, so you can use whatever is good for your
app to init the auth-server-url dynamically (For example read it from System property)
Marek
On 2.4.2015 19:21, Ryvlin, Andrey wrote:
Hi
I have AngularJs based UI web app talking to RESTfull web services using Keycloak
security.
Keycloak is running on a separate instance of Wildfly having https connection.
UI Web application has keycloak.json file with hardcoded Keycloak URL.
Everything works well with one problem: when I need to install my web application to a
different environment I need to open WAR, modify keycloak.json with new URL and package it
back.
Since we deliver the entire installation to the client, I don’t know their host names, so
they have to open WAR, which is in-convenient.
Is there any way to avoid that?
Thanks‼
Thanks‼
-----------------
Andrey Ryvlin
Principal Software Engineer
Phone: 952-979-8492
5705 W Old Shakopee Road, Suite 100
Bloomington, MN 55437 USA
ARyvlin@MorphoTrust.com<mailto:ARyvlin@MorphoTrust.com>
www.MorphoTrust.com<http://www.morphotrust.com/>
[cid:image003.jpg@01CFF75A.60542BC0]
________________________________
This message is only for the use of the intended recipient and may contain information
that is CONFIDENTIAL and PROPRIETARY to MorphoTrust USA, Inc. If you are not the intended
recipient, please erase all copies of the message and its attachments and notify the
sender immediately.
_______________________________________________
keycloak-user mailing list
keycloak-user@lists.jboss.org<mailto:keycloak-user@lists.jboss.org>
https://lists.jboss.org/mailman/listinfo/keycloak-user