You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by GitBox <gi...@apache.org> on 2021/04/27 03:21:18 UTC

[GitHub] [iotdb] JulianFeinauer commented on a change in pull request #3073: Fixed openid bug

JulianFeinauer commented on a change in pull request #3073:
URL: https://github.com/apache/iotdb/pull/3073#discussion_r620823723



##########
File path: server/src/main/java/org/apache/iotdb/db/auth/authorizer/OpenIdAuthorizer.java
##########
@@ -99,8 +99,7 @@ private static JSONObject getJWKFromProvider(String providerUrl)
     logger.debug("Using Provider Metadata: {}", providerMetadata);
 
     try {
-      URL url =
-          new URI(providerMetadata.getJWKSetURI().toString().replace("http", "https")).toURL();
+      URL url = new URI(providerMetadata.getJWKSetURI().toString().replace("http", "http")).toURL();

Review comment:
       Why do we generally need the replace here? 

##########
File path: server/src/main/java/org/apache/iotdb/db/auth/authorizer/OpenIdAuthorizer.java
##########
@@ -189,7 +188,7 @@ private Claims validateToken(String token) {
         .setAllowedClockSkewSeconds(Long.MAX_VALUE / 1000)
         // .setSigningKey(DatatypeConverter.parseBase64Binary(secret))
         .setSigningKey(providerKey)
-        .parseClaimsJws(token)
+        .parseClaimsJws(token.replaceAll("access_token:", ""))

Review comment:
       What does this line do? 




-- 
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:
users@infra.apache.org