[keycloak-dev] Themes per application

Stian Thorgersen stian at redhat.com
Mon May 11 01:21:24 EDT 2015


1 is the best option (well 3 obviously ;))

Beyond making client_id available we're not going to add any specific support for a theme per-client as it just doesn't make sense. Give me a good use-case for it and we can re-consider though.

----- Original Message -----
> From: "Marcio Lima" <marcioferlan at gmail.com>
> To: "Stian Thorgersen" <stian at redhat.com>
> Cc: keycloak-dev at lists.jboss.org
> Sent: Friday, 8 May, 2015 2:15:32 PM
> Subject: Re: [keycloak-dev] Themes per application
> 
> Hi Stian, thanks for the quick response!
> 
> I do agree the login happens at Realm level and that shouldn't and won't
> change.
> However, in my case, the applications in that Realm are different.
> 
> I basically see the following options to workaround it:
> 
>  1. *Create one theme with **<#if>**blocks for each application*
>     In this case I would need to change this template if a new
>     application comes in or when something changes in any of the login
>     pages (blocks).
> 
>  2. *Dinamically load login pages from the theme page**
>     *I ran this test and it worked just fine, but, I felt like I
>     shouldn't be doing it this way... bad smell, you know? (:P)
>     The theme login page loads a static login page of each application
>     using the *client_id* variable. Then, places the contents on the
>     current page and sets the necessary elements to Keycloak expected
>     values (like form action, forgot password and register user links
>     URLs, error messages, etc).
>     For each new application, all I have to do is create the static
>     resources in a */themes/${client_id}* folder, with the correct
>     element IDs and it does the trick.
>     Of course there are some drawbacks, but it turns out that I have now
>     3 applications using this approach. I wish I could have
>     per-application themes, rather.
> 
>  3. *Convince my client to use the same login page for all applications**
>     *This would be the standard approach, but, unfortunatelly, isn't an
>     option for me.
> 
> Any thoughts on that?
> 
> Thanks in advance.
> 
> Regards,
> 
> Marcio Fernandes de Lima
> http://linkedin.com/in/marcioferlan
> SCJP, SCWCD, MySQL Core Certified
> 
> On 08/05/2015 02:14, Stian Thorgersen wrote:
> > When a user logs in the user logs in to the realm, not the application. So
> > it doesn't make sense to have different login pages per application.
> >
> > ----- Original Message -----
> >> From: "Marcio Lima" <marcioferlan at gmail.com>
> >> To: keycloak-dev at lists.jboss.org
> >> Sent: Thursday, 7 May, 2015 11:30:46 PM
> >> Subject: [keycloak-dev] Themes per application
> >>
> >> Hello guys!
> >>
> >> I'm trying to implement Keycloak in my solution, but it turns out that I
> >> need to have a completely different login page per application in the
> >> same Realm. Keycloak allows me to create themes, but only at Realm
> >> level, not at Application level.
> >>
> >> How would you guys suggest me approaching this? Any plans to develop
> >> such a feature or ways to work around it?
> >>
> >> Thanks in advance!
> >> --
> >>
> >> Atenciosamente,
> >>
> >> Marcio Fernandes de Lima
> >> http://linkedin.com/in/marcioferlan
> >> SCJP, SCWCD, MySQL Core Certified
> >>
> >> _______________________________________________
> >> keycloak-dev mailing list
> >> keycloak-dev at lists.jboss.org
> >> https://lists.jboss.org/mailman/listinfo/keycloak-dev
> >>
> 
> 


More information about the keycloak-dev mailing list