<html><body><div><br></div><div><br>Am 24. Februar 2015 um 07:26 schrieb Stian Thorgersen <stian@redhat.com>:<br><br></div><div><blockquote type="cite"><div class="msg-quote"><div class="_stretch"><span class="body-text-content"><span class="body-text-content"><br><br>----- Original Message -----<br></span></span><blockquote class="quoted-plain-text" type="cite">From: "Marek Posolda" <<a href="mailto:mposolda@redhat.com" data-mce-href="mailto:mposolda@redhat.com">mposolda@redhat.com</a>></blockquote><blockquote class="quoted-plain-text" type="cite">To: "Michael Gerber" <<a href="mailto:gerbermichi@me.com" data-mce-href="mailto:gerbermichi@me.com">gerbermichi@me.com</a>>, "Stan Silvert" <<a href="mailto:ssilvert@redhat.com" data-mce-href="mailto:ssilvert@redhat.com">ssilvert@redhat.com</a>></blockquote><blockquote class="quoted-plain-text" type="cite">Cc: <a href="mailto:keycloak-dev@lists.jboss.org" data-mce-href="mailto:keycloak-dev@lists.jboss.org">keycloak-dev@lists.jboss.org</a></blockquote><blockquote class="quoted-plain-text" type="cite">Sent: Monday, February 23, 2015 6:48:00 PM</blockquote><blockquote class="quoted-plain-text" type="cite">Subject: Re: [keycloak-dev] Internationalization support (KEYCLOAK-301)</blockquote><blockquote class="quoted-plain-text" type="cite"></blockquote><blockquote class="quoted-plain-text" type="cite">Will the order be configurable? For example admin may want to configure</blockquote><blockquote class="quoted-plain-text" type="cite">realm locale (5) and wants users to use this one instead of</blockquote><blockquote class="quoted-plain-text" type="cite">Accept-Language header (4) ?</blockquote><span class="body-text-content"><span class="body-text-content"><br>Is that really required?</span></span></div></div></blockquote><span> </span></div><div><div>A configurable order doesn't make sense for me, because you shouldn't change step 1, 2, 3 and 5. </div><div>The only possible solution would be to make step 4 (Accept-Language) optional. So, the admin can disable it in the admin console.</div><blockquote type="cite"><div class="msg-quote"><div class="_stretch"><span class="body-text-content"><span class="body-text-content"><br><br></span></span><blockquote class="quoted-plain-text" type="cite"></blockquote><blockquote class="quoted-plain-text" type="cite">Marek</blockquote><blockquote class="quoted-plain-text" type="cite"></blockquote><blockquote class="quoted-plain-text" type="cite">On 23.2.2015 18:40, Michael Gerber wrote:</blockquote><blockquote class="quoted-plain-text" type="cite">> The algorithm to determine the correct locale is like that:</blockquote><blockquote class="quoted-plain-text" type="cite">> 1. Locale cookie</blockquote><blockquote class="quoted-plain-text" type="cite">> 2. User profile (UserModel.attribute)</blockquote><blockquote class="quoted-plain-text" type="cite">> 3. ui_locales query parameter</blockquote><blockquote class="quoted-plain-text" type="cite">> 4. Accept-Language http header</blockquote><blockquote class="quoted-plain-text" type="cite">> 5. Default realm locale</blockquote><blockquote class="quoted-plain-text" type="cite">></blockquote><blockquote class="quoted-plain-text" type="cite">> The login page has also a dropdown with all available locales. The selected</blockquote><blockquote class="quoted-plain-text" type="cite">> value will be stored in the locale cookie.</blockquote><blockquote class="quoted-plain-text" type="cite">>> Am 23.02.2015 um 18:14 schrieb Stan Silvert <<a href="mailto:ssilvert@redhat.com" data-mce-href="mailto:ssilvert@redhat.com">ssilvert@redhat.com</a>>:</blockquote><blockquote class="quoted-plain-text" type="cite">>></blockquote><blockquote class="quoted-plain-text" type="cite">>> On 2/23/2015 12:00 PM, Bill Burke wrote:</blockquote><blockquote class="quoted-plain-text" type="cite">>>> What's the best practice for choosing local?</blockquote><blockquote class="quoted-plain-text" type="cite">>> As I understand it, the thing to do is to use the accept-language header</blockquote><blockquote class="quoted-plain-text" type="cite">>> as a starting point. If it's the only thing you have to go on then use</blockquote><blockquote class="quoted-plain-text" type="cite">>> it.</blockquote><blockquote class="quoted-plain-text" type="cite">>></blockquote><blockquote class="quoted-plain-text" type="cite">>> But I think we should definitely have a UserModel.attribute that is</blockquote><blockquote class="quoted-plain-text" type="cite">>> settable by the user.</blockquote><blockquote class="quoted-plain-text" type="cite">>></blockquote><blockquote class="quoted-plain-text" type="cite">>> Also, we have talked about building an "application switcher" component</blockquote><blockquote class="quoted-plain-text" type="cite">>> that developers can include in their apps. That app switcher should</blockquote><blockquote class="quoted-plain-text" type="cite">>> include a dropdown to switch locale as well as one for switching the</blockquote><blockquote class="quoted-plain-text" type="cite">>> application.</blockquote><blockquote class="quoted-plain-text" type="cite">>>> * User-Agent header?</blockquote><blockquote class="quoted-plain-text" type="cite">>>> * From a login hint? I think OIDC has something like this (but what</blockquote><blockquote class="quoted-plain-text" type="cite">>>> about SAML)?</blockquote><blockquote class="quoted-plain-text" type="cite">>>> * Should we store this information somewhere (cookie,</blockquote><blockquote class="quoted-plain-text" type="cite">>>> UserModel.attribute, etc..)</blockquote><blockquote class="quoted-plain-text" type="cite">>>></blockquote><blockquote class="quoted-plain-text" type="cite">>>></blockquote><blockquote class="quoted-plain-text" type="cite">>>> On 2/23/2015 11:53 AM, Michael Gerber wrote:</blockquote><blockquote class="quoted-plain-text" type="cite">>>>> Hi all,</blockquote><blockquote class="quoted-plain-text" type="cite">>>>></blockquote><blockquote class="quoted-plain-text" type="cite">>>>> I started to work on the internationalization support</blockquote><blockquote class="quoted-plain-text" type="cite">>>>> (<a href="https://issues.jboss.org/browse/KEYCLOAK-301" data-mce-href="https://issues.jboss.org/browse/KEYCLOAK-301">https://issues.jboss.org/browse/KEYCLOAK-301</a>).</blockquote><blockquote class="quoted-plain-text" type="cite">>>>></blockquote><blockquote class="quoted-plain-text" type="cite">>>>> I’ve already implemented the realm config in the admin console. I’ve put</blockquote><blockquote class="quoted-plain-text" type="cite">>>>> it into the „Theme Setting“ (see screenshot)</blockquote><blockquote class="quoted-plain-text" type="cite">>>>> I added the possibility to enable internationalization, add supported</blockquote><blockquote class="quoted-plain-text" type="cite">>>>> locales and a select a default locale.</blockquote><blockquote class="quoted-plain-text" type="cite">>>>></blockquote><blockquote class="quoted-plain-text" type="cite">>>>> Now I’d like to implement the logic which choose the correct locale.</blockquote><blockquote class="quoted-plain-text" type="cite">>>>> Therefore I need the http header, cookie, query parameter, realm and</blockquote><blockquote class="quoted-plain-text" type="cite">>>>> user.</blockquote><blockquote class="quoted-plain-text" type="cite">>>>> The LoginFormsProvider and AccountProvider have all this information</blockquote><blockquote class="quoted-plain-text" type="cite">>>>> apart from the http header and the cookie.</blockquote><blockquote class="quoted-plain-text" type="cite">>>>> So I thought I could replace the UriInfo with the HttpRequest, but that</blockquote><blockquote class="quoted-plain-text" type="cite">>>>> doesn’t work, because I can not access the UriInfo through the</blockquote><blockquote class="quoted-plain-text" type="cite">>>>> HttpRequest (java.lang.NoSuchMethodError:</blockquote><blockquote class="quoted-plain-text" type="cite">>>>> org.jboss.resteasy.spi.HttpRequest.getUri()Ljavax/ws/rs/core/UriInfo;).</blockquote><blockquote class="quoted-plain-text" type="cite">>>>> So, I will add the HttpHeader to the LoginFormsProvider</blockquote><blockquote class="quoted-plain-text" type="cite">>>>> and AccountProvider, or does anyone have a better idea?</blockquote><blockquote class="quoted-plain-text" type="cite">>>>></blockquote><blockquote class="quoted-plain-text" type="cite">>>>> @Bill</blockquote><blockquote class="quoted-plain-text" type="cite">>>>> How do you plan to store the claim „locale“ on a user? Will it be</blockquote><blockquote class="quoted-plain-text" type="cite">>>>> accessible through the UserModel interface?</blockquote><blockquote class="quoted-plain-text" type="cite">>>>></blockquote><blockquote class="quoted-plain-text" type="cite">>>>> Best</blockquote><blockquote class="quoted-plain-text" type="cite">>>>> Michael</blockquote><blockquote class="quoted-plain-text" type="cite">>>>></blockquote><blockquote class="quoted-plain-text" type="cite">>>>></blockquote><blockquote class="quoted-plain-text" type="cite">>>>></blockquote><blockquote class="quoted-plain-text" type="cite">>>>> _______________________________________________</blockquote><blockquote class="quoted-plain-text" type="cite">>>>> keycloak-dev mailing list</blockquote><blockquote class="quoted-plain-text" type="cite">>>>> <a href="mailto:keycloak-dev@lists.jboss.org" data-mce-href="mailto:keycloak-dev@lists.jboss.org">keycloak-dev@lists.jboss.org</a></blockquote><blockquote class="quoted-plain-text" type="cite">>>>> <a href="https://lists.jboss.org/mailman/listinfo/keycloak-dev" data-mce-href="https://lists.jboss.org/mailman/listinfo/keycloak-dev">https://lists.jboss.org/mailman/listinfo/keycloak-dev</a></blockquote><blockquote class="quoted-plain-text" type="cite">>>>></blockquote><blockquote class="quoted-plain-text" type="cite">>> _______________________________________________</blockquote><blockquote class="quoted-plain-text" type="cite">>> keycloak-dev mailing list</blockquote><blockquote class="quoted-plain-text" type="cite">>> <a href="mailto:keycloak-dev@lists.jboss.org" data-mce-href="mailto:keycloak-dev@lists.jboss.org">keycloak-dev@lists.jboss.org</a></blockquote><blockquote class="quoted-plain-text" type="cite">>> <a href="https://lists.jboss.org/mailman/listinfo/keycloak-dev" data-mce-href="https://lists.jboss.org/mailman/listinfo/keycloak-dev">https://lists.jboss.org/mailman/listinfo/keycloak-dev</a></blockquote><blockquote class="quoted-plain-text" type="cite">></blockquote><blockquote class="quoted-plain-text" type="cite">> _______________________________________________</blockquote><blockquote class="quoted-plain-text" type="cite">> keycloak-dev mailing list</blockquote><blockquote class="quoted-plain-text" type="cite">> <a href="mailto:keycloak-dev@lists.jboss.org" data-mce-href="mailto:keycloak-dev@lists.jboss.org">keycloak-dev@lists.jboss.org</a></blockquote><blockquote class="quoted-plain-text" type="cite">> <a href="https://lists.jboss.org/mailman/listinfo/keycloak-dev" data-mce-href="https://lists.jboss.org/mailman/listinfo/keycloak-dev">https://lists.jboss.org/mailman/listinfo/keycloak-dev</a></blockquote><blockquote class="quoted-plain-text" type="cite"></blockquote><blockquote class="quoted-plain-text" type="cite">_______________________________________________</blockquote><blockquote class="quoted-plain-text" type="cite">keycloak-dev mailing list</blockquote><blockquote class="quoted-plain-text" type="cite"><a href="mailto:keycloak-dev@lists.jboss.org" data-mce-href="mailto:keycloak-dev@lists.jboss.org">keycloak-dev@lists.jboss.org</a></blockquote><blockquote class="quoted-plain-text" type="cite"><a href="https://lists.jboss.org/mailman/listinfo/keycloak-dev" data-mce-href="https://lists.jboss.org/mailman/listinfo/keycloak-dev">https://lists.jboss.org/mailman/listinfo/keycloak-dev</a></blockquote></div></div></blockquote></div></body></html>