You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by GitBox <gi...@apache.org> on 2022/02/08 21:01:57 UTC

[GitHub] [solr] janhoy commented on a change in pull request #611: SOLR-15907 JWT Auth move to module - rebased after Spotless

janhoy commented on a change in pull request #611:
URL: https://github.com/apache/solr/pull/611#discussion_r802054687



##########
File path: solr/core/src/java/org/apache/solr/security/JWTPrincipal.java
##########
@@ -77,10 +75,15 @@ public int hashCode() {
 
   @Override
   public String toString() {
-    return "JWTPrincipal{" +
-        "username='" + username + '\'' +
-        ", token='" + "*****" + '\'' +
-        ", claims=" + claims +
-        '}';
+    return "JWTPrincipal{"
+        + "username='"
+        + username
+        + '\''

Review comment:
       Used String.format() instead

##########
File path: solr/core/src/java/org/apache/solr/security/JWTPrincipalWithUserRoles.java
##########
@@ -61,11 +58,17 @@ public int hashCode() {
 
   @Override
   public String toString() {
-    return "JWTPrincipalWithUserRoles{" +
-        "username='" + username + '\'' +
-        ", token='" + "*****" + '\'' +
-        ", claims=" + claims +
-        ", roles=" + roles +
-        '}';
+    return "JWTPrincipalWithUserRoles{"
+        + "username='"
+        + username
+        + '\''

Review comment:
       Used String.format() instead

##########
File path: solr/core/src/java/org/apache/solr/security/JWTVerificationkeyResolver.java
##########
@@ -140,16 +155,23 @@ public Key resolveKey(JsonWebSignature jws, List<JsonWebStructure> nestingContex
       }
     } catch (JoseException | IOException | InvalidJwtException | MalformedClaimException e) {
       StringBuilder sb = new StringBuilder();
-      sb.append("Unable to find a suitable verification key for JWS w/ header ").append(jws.getHeaders().getFullHeaderAsJsonString());
-      sb.append(" due to an unexpected exception (").append(e).append(") while obtaining or using keys from source ");
+      sb.append("Unable to find a suitable verification key for JWS w/ header ")
+          .append(jws.getHeaders().getFullHeaderAsJsonString());
+      sb.append(" due to an unexpected exception (")
+          .append(e)
+          .append(") while obtaining or using keys from source ");
       sb.append(keysSource);
       throw new UnresolvableKeyException(sb.toString(), e);
     }
 
     if (theChosenOne == null) {
       StringBuilder sb = new StringBuilder();

Review comment:
       Used String.format() instead




-- 
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: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org