frankgh commented on code in PR #247:
URL: https://github.com/apache/cassandra-sidecar/pull/247#discussion_r2364874404


##########
server/src/main/java/org/apache/cassandra/sidecar/acl/authentication/JwtParameters.java:
##########
@@ -52,4 +53,44 @@ public interface JwtParameters
      * dynamically retrieve configuration information of an OpenID provider.
      */
     SecondBoundConfiguration configDiscoverInterval();
+
+    /**
+     * @return The configured method of JWT authentication to use. Defaults to 
oauth if not supplied.
+     */
+    AuthType jwtAuthType();
+
+    /**
+     * @return Optional path to a keystore to provide mutual TLS to PEM public 
key provider service
+     */
+    Optional<String> keystorePath();

Review Comment:
   I think generally we discourage usage of Optional in the project as the 
return type of a method, and instead perform the null check or surface things 
with exceptions instead. Looking at the usage of this method
   
   ```
   if (jwtParameters.keystorePath().isPresent())
   ```
   
   can be easily changed to 
   
   ```
   if (jwtParameters.keystorePath() != null)



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to