Making it simpler to override OIDC consent form check code
Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/524fe76f Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/524fe76f Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/524fe76f Branch: refs/heads/master-jaxrs-2.1 Commit: 524fe76f9cb6550ffae4a4a1c51834d5a278fe81 Parents: cacfe5c Author: Sergey Beryozkin <[email protected]> Authored: Mon Aug 29 11:21:04 2016 +0100 Committer: Sergey Beryozkin <[email protected]> Committed: Mon Aug 29 11:21:04 2016 +0100 ---------------------------------------------------------------------- .../oauth2/services/RedirectionBasedGrantService.java | 8 ++++++++ 1 file changed, 8 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cxf/blob/524fe76f/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/services/RedirectionBasedGrantService.java ---------------------------------------------------------------------- diff --git a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/services/RedirectionBasedGrantService.java b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/services/RedirectionBasedGrantService.java index efd832a..f844a2e 100644 --- a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/services/RedirectionBasedGrantService.java +++ b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/services/RedirectionBasedGrantService.java @@ -236,6 +236,14 @@ public abstract class RedirectionBasedGrantService extends AbstractOAuthService UserSubject userSubject, List<String> requestedScope, List<OAuthPermission> permissions) { + return noConsentForRequestedScopes(params, client, userSubject, requestedScope, permissions); + } + + protected boolean noConsentForRequestedScopes(MultivaluedMap<String, String> params, + Client client, + UserSubject userSubject, + List<String> requestedScope, + List<OAuthPermission> permissions) { return scopesRequiringNoConsent != null && requestedScope != null && requestedScope.size() == scopesRequiringNoConsent.size()
