lasdf1234 commented on code in PR #10503:
URL: https://github.com/apache/gravitino/pull/10503#discussion_r2973085702


##########
server-common/src/main/java/org/apache/gravitino/server/authentication/StaticSignKeyValidator.java:
##########
@@ -138,6 +160,26 @@ private String extractPrincipal(Claims claims) {
         "No valid principal found in token. Checked fields: %s", 
principalFields);
   }
 
+  /** Extracts the groups from the validated JWT claims using configured 
field(s). */
+  private List<String> extractGroups(Claims claims) {
+    if (groupFields != null && !groupFields.isEmpty()) {
+      for (String field : groupFields) {
+        if (StringUtils.isNotBlank(field)) {
+          try {
+            Object groups = claims.get(field);
+            if (groups instanceof List) {
+              return (List<String>) groups;
+            }
+          } catch (Exception e) {
+            LOG.warn("Failed to parse groups from claim field: {}", field, e);
+          }

Review Comment:
   Got,I resolved



-- 
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