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