From 1bf72b802ade1f04e35c55061615895ccb435c48 Mon Sep 17 00:00:00 2001 From: Dominik Frantisek Bucik Date: Mon, 10 Jan 2022 08:47:48 +0100 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=90=9B=20Do=20not=20display=20reme?= =?UTF-8?q?mber=20me=20when=20prompt=3Dconsnet?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Also updated text for checkbox --- .../src/main/resources/localization/messages_cs.properties | 2 +- .../src/main/resources/localization/messages_en.properties | 2 +- .../src/main/webapp/WEB-INF/views/themedApprove.jsp | 2 ++ .../cz/muni/ics/oauth2/web/OAuthConfirmationController.java | 2 ++ 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/perun-oidc-server-webapp/src/main/resources/localization/messages_cs.properties b/perun-oidc-server-webapp/src/main/resources/localization/messages_cs.properties index d59769ff9..67163b19c 100644 --- a/perun-oidc-server-webapp/src/main/resources/localization/messages_cs.properties +++ b/perun-oidc-server-webapp/src/main/resources/localization/messages_cs.properties @@ -5,7 +5,7 @@ login=Login consent_privacy_policy=Zásady zpracování osobních údajů pro službu consent_header=Obsah odesílaných osobních informací službě consent_title=Obsah odesílaných osobních informací službě -remember=Příště se již neptat +remember=Zapamatovat #APPROVE_DEVICE device_approve_privacy=Bezpečnostní politika služby diff --git a/perun-oidc-server-webapp/src/main/resources/localization/messages_en.properties b/perun-oidc-server-webapp/src/main/resources/localization/messages_en.properties index 6ca652672..02ca59c6a 100644 --- a/perun-oidc-server-webapp/src/main/resources/localization/messages_en.properties +++ b/perun-oidc-server-webapp/src/main/resources/localization/messages_en.properties @@ -5,7 +5,7 @@ login=login consent_privacy_policy=Privacy policy for the service consent_header=Consent about releasing personal information to service consent_title=Consent about releasing personal information to service -remember=Do not ask again +remember=Remember #APPROVE_DEVICE device_approve_privacy=Privacy policy for the service diff --git a/perun-oidc-server-webapp/src/main/webapp/WEB-INF/views/themedApprove.jsp b/perun-oidc-server-webapp/src/main/webapp/WEB-INF/views/themedApprove.jsp index a015abbb1..8aead87e5 100644 --- a/perun-oidc-server-webapp/src/main/webapp/WEB-INF/views/themedApprove.jsp +++ b/perun-oidc-server-webapp/src/main/webapp/WEB-INF/views/themedApprove.jsp @@ -40,6 +40,7 @@

+
@@ -48,6 +49,7 @@
+
diff --git a/perun-oidc-server/src/main/java/cz/muni/ics/oauth2/web/OAuthConfirmationController.java b/perun-oidc-server/src/main/java/cz/muni/ics/oauth2/web/OAuthConfirmationController.java index 6f646400f..1abd6e659 100644 --- a/perun-oidc-server/src/main/java/cz/muni/ics/oauth2/web/OAuthConfirmationController.java +++ b/perun-oidc-server/src/main/java/cz/muni/ics/oauth2/web/OAuthConfirmationController.java @@ -90,6 +90,7 @@ public class OAuthConfirmationController { public static final String CONSENT = "consent"; public static final String THEMED_APPROVE = "themedApprove"; public static final String APPROVE = "approve"; + public static final String REMEMBER_ENABLED = "rememberEnabled"; @Getter @Setter @@ -165,6 +166,7 @@ public class OAuthConfirmationController { model.put(AUTH_REQUEST, authRequest); model.put(CLIENT, client); model.put(REDIRECT_URI, authRequest.getRedirectUri()); + model.put(REMEMBER_ENABLED, !prompts.contains(CONSENT)); Set sortedScopes = ControllerUtils.getSortedScopes(authRequest.getScope(), scopeService); model.put(SCOPES, sortedScopes);