[ 
https://issues.apache.org/jira/browse/KNOX-2731?focusedWorklogId=756540&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-756540
 ]

ASF GitHub Bot logged work on KNOX-2731:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 13/Apr/22 16:59
            Start Date: 13/Apr/22 16:59
    Worklog Time Spent: 10m 
      Work Description: pzampino commented on code in PR #554:
URL: https://github.com/apache/knox/pull/554#discussion_r849704522


##########
gateway-server/src/main/java/org/apache/knox/gateway/services/token/impl/DefaultTokenAuthorityService.java:
##########
@@ -104,26 +103,15 @@ public void setAliasService(AliasService as) {
 
   @Override
   public JWT issueToken(JWTokenAttributes jwtAttributes) throws 
TokenServiceException {
-    String[] claimArray = new String[6];
-    claimArray[0] = "KNOXSSO";
-    claimArray[1] = jwtAttributes.getUserName();
-    claimArray[2] = null;
-    if (jwtAttributes.getExpires() == -1) {
-      claimArray[3] = null;
-    }
-    else {
-      claimArray[3] = String.valueOf(jwtAttributes.getExpires());
-    }
     final String algorithm = jwtAttributes.getAlgorithm();
     if(SUPPORTED_HMAC_SIG_ALGS.contains(algorithm)) {
-      claimArray[4] = null;
-      claimArray[5] = null;
+      jwtAttributes.setKid(null);

Review Comment:
   I would expect them to be null by default. Are they getting initialized, and 
then cleared here at a later time?
   I guess it's not that big of an issue, but it would simplify the code a 
little. Let's worry about it later.





Issue Time Tracking
-------------------

    Worklog Id:     (was: 756540)
    Time Spent: 3h  (was: 2h 50m)

> Allow group membership information to be included in issued JWTs
> ----------------------------------------------------------------
>
>                 Key: KNOX-2731
>                 URL: https://issues.apache.org/jira/browse/KNOX-2731
>             Project: Apache Knox
>          Issue Type: Improvement
>            Reporter: Attila Magyar
>            Assignee: Attila Magyar
>            Priority: Major
>          Time Spent: 3h
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to