reta commented on code in PR #3304:
URL: https://github.com/apache/cxf/pull/3304#discussion_r3559792776


##########
rt/rs/security/sso/oidc/src/main/java/org/apache/cxf/rs/security/oidc/idp/UserInfoService.java:
##########
@@ -136,6 +142,22 @@ protected UserInfo createFromIdToken(IdToken idToken) {
         return userInfo;
     }
 
+    private boolean isClaimExposedByScope(String claimName, List<String> 
scopes) {
+        if (OidcUtils.PROFILE_CLAIMS.contains(claimName)) {
+            return scopes.contains(OidcUtils.PROFILE_SCOPE);
+        }
+        if (OidcUtils.EMAIL_CLAIMS.contains(claimName)) {
+            return scopes.contains(OidcUtils.EMAIL_SCOPE);
+        }
+        if (OidcUtils.ADDRESS_CLAIMS.contains(claimName)) {
+            return scopes.contains(OidcUtils.ADDRESS_SCOPE);
+        }
+        if (OidcUtils.PHONE_CLAIMS.contains(claimName)) {
+            return scopes.contains(OidcUtils.PHONE_SCOPE);
+        }
+        return true;

Review Comment:
   Shouldn't it be `false` by default?  Or we really don't care what those 
claims are



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to