From 80080d9ecac59c76608f20805d0b5df6d4673c52 Mon Sep 17 00:00:00 2001 From: Alvar Sokk Date: Tue, 17 Dec 2024 16:53:19 +0200 Subject: [PATCH] AUT-2068 Correct label for tara auth logout button --- .../ria/govsso/client/controller/ClientController.java | 4 ---- .../GovssoClientInitiatedLogoutSuccessHandler.java | 6 +++--- src/main/resources/templates/dashboard.html | 10 ++++++---- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/src/main/java/ee/ria/govsso/client/controller/ClientController.java b/src/main/java/ee/ria/govsso/client/controller/ClientController.java index e6e83ec..be7118e 100644 --- a/src/main/java/ee/ria/govsso/client/controller/ClientController.java +++ b/src/main/java/ee/ria/govsso/client/controller/ClientController.java @@ -83,10 +83,6 @@ public ModelAndView dashboard(@AuthenticationPrincipal OidcUser oidcUser, Exampl if (AccessTokenUtil.isJwtAccessToken(accessToken)) { model.addObject("access_token", accessToken); } - String locale = LogoutUtil.getUiLocale(request); - if (locale != null) { - model.addObject("ui_locales", locale); - } } log.info("Showing dashboard for subject='{}'", oidcUser.getSubject()); diff --git a/src/main/java/ee/ria/govsso/client/govsso/oauth2/GovssoClientInitiatedLogoutSuccessHandler.java b/src/main/java/ee/ria/govsso/client/govsso/oauth2/GovssoClientInitiatedLogoutSuccessHandler.java index 17b6733..6b077dd 100644 --- a/src/main/java/ee/ria/govsso/client/govsso/oauth2/GovssoClientInitiatedLogoutSuccessHandler.java +++ b/src/main/java/ee/ria/govsso/client/govsso/oauth2/GovssoClientInitiatedLogoutSuccessHandler.java @@ -94,9 +94,9 @@ private String endpointUri(HttpServletRequest request, URI endSessionEndpoint, S if (request.getMethod().equals(HttpMethod.GET.name())) { builder.queryParam("id_token_hint", idToken); - if (StringUtils.isNotEmpty(locale)) { - builder.queryParam(UI_LOCALES_PARAMETER, locale); - } + } + if (StringUtils.isNotEmpty(locale)) { + builder.queryParam(UI_LOCALES_PARAMETER, locale); } if (postLogoutRedirectUri != null) { builder.queryParam("post_logout_redirect_uri", postLogoutRedirectUri); diff --git a/src/main/resources/templates/dashboard.html b/src/main/resources/templates/dashboard.html index c506f29..1bd73b5 100644 --- a/src/main/resources/templates/dashboard.html +++ b/src/main/resources/templates/dashboard.html @@ -23,12 +23,14 @@