[keycloak-user] Keycloak: Make query string param available in marker FreeMarker template

Will Lopez will.lopez77 at gmail.com
Tue Jul 31 13:43:25 EDT 2018


I have a use case where I need to render a block of HTML depending on the value of a query string param in the login page. The value will be coming from the login URL similar to this:

http://localhost:8080/auth/realms/default/protocol/openid-connect/auth?...&customvar=1
I would like to have customvar available in the login.ftl to accomplish my objective. So far I have tried to retrieve the baseUrl from the client bean, but it’s not available, the app crashes when I attempt to access baseUrl. I have also attempted to access the request url in the ${url}, but it's not available either.

Thanks in advance for any help.


More information about the keycloak-user mailing list