[keycloak-user] Keycloak Multi Tenancy implementation with login through javascript (a webpage)

Geoffrey Cleaves geoff at opticks.io
Tue Dec 11 13:00:32 EST 2018


The javascript adapter's Keycloak object can be initialized with a JSON
variable instead of using a config file. Could you use this to
your advantage? In my case the clientId is variable, not the realm. Maybe
have a intermediate page where the user fills in his user name, which
allows you to find the correct realm before redirecting to Keycloak?

On Tue, 11 Dec 2018 at 17:52, Vikram <vikram.eswar at fleetroute.com> wrote:

> Hello all,
>
> I want to assign different realms to different clients (organisations)
> in keycloak. The login to keycloak is achieved through a webpage which
> acquires a valid token from keycloak which is then passed with the rest
> requests that I make from my website to a springboot server that uses a
> keycloak adapter for authentication.
>
> Now, the javascript adapter needs a keycloak configuration file that has
> details about the realm that I want to log in to. But, the problem is
> that I do not know which realm the user belongs to because he / she can
> be from any organisation ie. the login page for all organisations is the
> same.
>
> What is the best way to achieve this ? I assume that this kind of
> approach is quite common these days but cannot find a solution..
>
> Regards,
> Vikram
>
> _______________________________________________
> keycloak-user mailing list
> keycloak-user at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/keycloak-user
>


-- 

Regards,
Geoffrey Cleaves


More information about the keycloak-user mailing list