[keycloak-user] Themeing: Set Urls + Locale

Danny Trunk dt at zyres.com
Tue Apr 11 02:05:23 EDT 2017


For the URLs I'm currently using the Base Url you can provide through 
the client configuration in the Keycloak Admin Console. Maybe there's a 
better way as the Base URL isn't a mandatory field and could be empty.

Regarding the locale I still don't have a solution.


Am 06.04.2017 um 12:20 schrieb Danny Trunk:
> Regarding the locale I've found the following code:
> https://github.com/keycloak/keycloak/blob/master/services/src/main/java/org/keycloak/services/util/LocaleHelper.java#L67
>
> - kc_locale query parameter: Sounds interesting, how to append it when
> redirecting to the Keycloak Login Page through Spring Security Adapter?
>
> - locale cookie: Not interesting as I cannot save a cookie from my
> Webapp to use in the Keycloak Server
>
> - user profile: Not interesting as the user isn't logged in here
>
> - ui_locales query parameter: Don't know what this is and where/how to set
>
> - Accept-language http header: Not interesting as the user can browse
> the webapp in a different locale
>
>
> Am 06.04.2017 um 09:04 schrieb Danny Trunk:
>> Hello everyone,
>>
>> is there a clean way to set the registrationUrl, loginUpdateProfileUrl,
>> loginResetCredentialsUrl to my own one based on the Redirect URI as well
>> as sending a Locale to the Keycloak pages which to be used instead of
>> the configured default?
>> I'm using the Spring Security Adapter and I'm also familiar in creating
>> Service Provider.
>>
>> I need to do the registration, password forgotten and update profile
>> processes within my webapp as there are some post-processes to be done
>> and I don't want to rewrite them.
>> That's no problem as I'm using a User Storage Provider.
>>
>> The Redirect URI looks like https://localhost:8443/de_DE/login.html
>> The Registration page is accessible through
>> https://localhost:8443/de_DE/register.html
>> The Password forgotten page is accessible through
>> https://localhost:8443/de_DE/pwreminder.html
>> The Update Profile page is accessible through
>> https://localhost:8443/de_DE/myaccount.html
>>
>> The hackish way would be to get the Query Parameter "redirect_uri" in
>> the ftl Template and build the base url "https://localhost:8443/de_DE".
>> But then the Template still uses the default Locale.
>>
>> Are there any clean ways?
>> _______________________________________________
>> keycloak-user mailing list
>> keycloak-user at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/keycloak-user
> _______________________________________________
> keycloak-user mailing list
> keycloak-user at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/keycloak-user


More information about the keycloak-user mailing list