KEYCLOAK-15459 Fix serialization of locale in admin console's “whoami” (#7397)

call.
This commit is contained in:
devopsix 2021-03-30 00:37:26 +02:00 committed by GitHub
parent 0033b7daf7
commit 590ee1b1a2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View file

@ -163,6 +163,11 @@ public class AdminConsole {
public void setLocale(Locale locale) {
this.locale = locale;
}
@JsonProperty(value = "locale")
public String getLocaleLanguageTag() {
return locale != null ? locale.toLanguageTag() : null;
}
}
/**

View file

@ -36,7 +36,7 @@ public class AdminConsoleWhoAmILocaleTest extends AbstractKeycloakTest {
private static final String DEFAULT_LOCALE = "en";
private static final String REALM_LOCALE = "no";
private static final String USER_LOCALE = "de";
private static final String EXTRA_LOCALE = "ru";
private static final String EXTRA_LOCALE = "zh-CN";
private CloseableHttpClient client;