Skip to content
This repository was archived by the owner on Sep 28, 2022. It is now read-only.

Commit c23e603

Browse files
author
Dominik František Bučík
authored
Merge pull request #120 from CESNET/prompt_consent_remember_me
fix: 🐛 Do not display remember me when prompt=consnet
2 parents 7877e18 + 1bf72b8 commit c23e603

File tree

4 files changed

+6
-2
lines changed

4 files changed

+6
-2
lines changed

perun-oidc-server-webapp/src/main/resources/localization/messages_cs.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ login=Login
55
consent_privacy_policy=Zásady zpracování osobních údajů pro službu
66
consent_header=Obsah odesílaných osobních informací službě
77
consent_title=Obsah odesílaných osobních informací službě
8-
remember=Příště se již neptat
8+
remember=Zapamatovat
99

1010
#APPROVE_DEVICE
1111
device_approve_privacy=Bezpečnostní politika služby

perun-oidc-server-webapp/src/main/resources/localization/messages_en.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ login=login
55
consent_privacy_policy=Privacy policy for the service
66
consent_header=Consent about releasing personal information to service
77
consent_title=Consent about releasing personal information to service
8-
remember=Do not ask again
8+
remember=Remember
99

1010
#APPROVE_DEVICE
1111
device_approve_privacy=Privacy policy for the service

perun-oidc-server-webapp/src/main/webapp/WEB-INF/views/themedApprove.jsp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
</c:if>
4141
</p>
4242
<t:attributesConsent />
43+
<c:if test="${rememberEnabled}">
4344
<div class="row" id="saveconsentcontainer">
4445
<div class="col-xs-12">
4546
<div class="checkbox">
@@ -48,6 +49,7 @@
4849
</div>
4950
</div>
5051
</div>
52+
</c:if>
5153
<input id="user_oauth_approval" name="user_oauth_approval" value="true" type="hidden" />
5254
<input type="hidden" name="${_csrf.parameterName}" value="${_csrf.token}" />
5355
<t:consentButtons />

perun-oidc-server/src/main/java/cz/muni/ics/oauth2/web/OAuthConfirmationController.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ public class OAuthConfirmationController {
9090
public static final String CONSENT = "consent";
9191
public static final String THEMED_APPROVE = "themedApprove";
9292
public static final String APPROVE = "approve";
93+
public static final String REMEMBER_ENABLED = "rememberEnabled";
9394

9495
@Getter
9596
@Setter
@@ -165,6 +166,7 @@ public String confirmAccess(Map<String, Object> model, HttpServletRequest req, P
165166
model.put(AUTH_REQUEST, authRequest);
166167
model.put(CLIENT, client);
167168
model.put(REDIRECT_URI, authRequest.getRedirectUri());
169+
model.put(REMEMBER_ENABLED, !prompts.contains(CONSENT));
168170

169171
Set<SystemScope> sortedScopes = ControllerUtils.getSortedScopes(authRequest.getScope(), scopeService);
170172
model.put(SCOPES, sortedScopes);

0 commit comments

Comments
 (0)