pzampino commented on a change in pull request #440:
URL: https://github.com/apache/knox/pull/440#discussion_r623361585



##########
File path: 
gateway-provider-security-jwt/src/main/java/org/apache/knox/gateway/provider/federation/jwt/filter/AbstractJWTFilter.java
##########
@@ -444,41 +420,41 @@ protected boolean verifyTokenSignature(final JWT token) {
         }
       }
 
-      if (verified && tokenId != null) { // If successful, record the 
verification for future reference
-        recordSignatureVerification(tokenId);
+      if (verified) { // If successful, record the verification for future 
reference
+        recordSignatureVerification(serializedJWT);
       }
     }
 
     return verified;
   }
 
   /**
-   * Determine if the specified token signature has previously been 
successfully verified.
+   * Determine if the specified JWT signature has previously been successfully 
verified.
    *
-   * @param tokenId The unique identifier for a token.
+   * @param jwt A serialized JWT String.
    *
    * @return true, if the specified token has been previously verified; 
Otherwise, false.
    */
-  protected boolean hasSignatureBeenVerified(final String tokenId) {
-    return (verifiedTokens.getIfPresent(tokenId) != null);
+  protected boolean hasSignatureBeenVerified(final String jwt) {

Review comment:
       I had originally removed the delegating methods, but they currently 
facilitate testing, so I've chosen to leave them for now.




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

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


Reply via email to