[keycloak-dev] URL Query Parameters not propagated to FreeMarkerLoginFormsProvider

Stian Thorgersen sthorger at redhat.com
Tue Feb 23 01:42:03 EST 2016


It's been a while since I've touched that code, but AFAIR the queryParams
field is used to set additional query params, not to retrieve those
associated with the current request.

On 23 February 2016 at 07:32, Thomas Darimont <
thomas.darimont at googlemail.com> wrote:

> Sorry was probably to late for me yesterday...
>
> I was trying to add dynamic theme selection via URL parameter - and I
> noticed that a "theme"
> parameter passed to the login URL was not propagated
> to FreeMarkerLoginFormsProvider.
>
> I needed to be able to dynamically select a theme for the login site with
> a parameter:
>
> https://gist.github.com/thomasdarimont/c59acdd7d7d41fd5c041#file-freemarkerloginformsprovider-java-L201
>
> Cheers,
> Thomas
>
> 2016-02-23 6:58 GMT+01:00 Stian Thorgersen <sthorger at redhat.com>:
>
>> What's the actual problem you're having?
>>
>> On 22 February 2016 at 23:00, Thomas Darimont <
>> thomas.darimont at googlemail.com> wrote:
>>
>>> It seems that queryParams are not populated in [0]: (there is no
>>> assignment)
>>>
>>> I think at the two places [1] [2] where the queryParameterMap is build
>>> uriInfo.getQueryParameters() should be used.
>>>
>>> [0]
>>> https://github.com/keycloak/keycloak/blob/337f39009010705346e28dab8ea326a53acdb5bf/services/src/main/java/org/keycloak/forms/login/freemarker/FreeMarkerLoginFormsProvider.java#L94
>>> [1]
>>> https://github.com/keycloak/keycloak/blob/337f39009010705346e28dab8ea326a53acdb5bf/services/src/main/java/org/keycloak/forms/login/freemarker/FreeMarkerLoginFormsProvider.java#L181
>>> [2]
>>> https://github.com/keycloak/keycloak/blob/337f39009010705346e28dab8ea326a53acdb5bf/services/src/main/java/org/keycloak/forms/login/freemarker/FreeMarkerLoginFormsProvider.java#L334
>>>
>>> Cheers,
>>> Thomas
>>>
>>> _______________________________________________
>>> keycloak-dev mailing list
>>> keycloak-dev at lists.jboss.org
>>> https://lists.jboss.org/mailman/listinfo/keycloak-dev
>>>
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/keycloak-dev/attachments/20160223/f08f19f4/attachment.html 


More information about the keycloak-dev mailing list