burmanm commented on code in PR #318:
URL: https://github.com/apache/cassandra-sidecar/pull/318#discussion_r3002650715


##########
server/src/main/java/org/apache/cassandra/sidecar/modules/ConfigurationModule.java:
##########
@@ -117,15 +125,51 @@ CassandraInputValidationConfiguration 
validationConfiguration(SidecarConfigurati
     @Singleton
     CQLSessionProvider cqlSessionProvider(Vertx vertx,
                                           SidecarConfiguration 
sidecarConfiguration,
+                                          CqlAuthProvider cqlAuthProvider,
                                           DriverUtils driverUtils)
     {
         CQLSessionProviderImpl cqlSessionProvider = new 
CQLSessionProviderImpl(sidecarConfiguration,
                                                                                
NettyOptions.DEFAULT_INSTANCE,
+                                                                               
cqlAuthProvider,
                                                                                
driverUtils);
         vertx.eventBus().localConsumer(ON_SERVER_STOP.address(), message -> 
cqlSessionProvider.close());
         return cqlSessionProvider;
     }
 
+    @Provides
+    @Singleton
+    CqlAuthProvider cqlAuthProvider(SidecarConfiguration sidecarConfiguration)
+    {
+        DriverConfiguration driverConfiguration = 
sidecarConfiguration.driverConfiguration();
+
+        ParameterizedClassConfiguration config = 
driverConfiguration.authProvider();
+        if (config == null)
+        {
+            // Fallback to the old one
+            Map<String, String> namedParameters = new HashMap<>();
+            namedParameters.put("username", driverConfiguration.username());
+            namedParameters.put("password", driverConfiguration.password());

Review Comment:
   Same as above.



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