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

Commit

Permalink
Merge pull request #120 from CESNET/prompt_consent_remember_me
Browse files Browse the repository at this point in the history
fix: 🐛 Do not display remember me when prompt=consnet
  • Loading branch information
Dominik František Bučík authored Jan 10, 2022
2 parents 7877e18 + 1bf72b8 commit c23e603
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
</c:if>
</p>
<t:attributesConsent />
<c:if test="${rememberEnabled}">
<div class="row" id="saveconsentcontainer">
<div class="col-xs-12">
<div class="checkbox">
Expand All @@ -48,6 +49,7 @@
</div>
</div>
</div>
</c:if>
<input id="user_oauth_approval" name="user_oauth_approval" value="true" type="hidden" />
<input type="hidden" name="${_csrf.parameterName}" value="${_csrf.token}" />
<t:consentButtons />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -165,6 +166,7 @@ public String confirmAccess(Map<String, Object> model, HttpServletRequest req, P
model.put(AUTH_REQUEST, authRequest);
model.put(CLIENT, client);
model.put(REDIRECT_URI, authRequest.getRedirectUri());
model.put(REMEMBER_ENABLED, !prompts.contains(CONSENT));

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

0 comments on commit c23e603

Please sign in to comment.