smiklosovic commented on code in PR #3085:
URL: https://github.com/apache/cassandra/pull/3085#discussion_r1479346451


##########
src/java/org/apache/cassandra/auth/IAuthenticator.java:
##########
@@ -179,5 +194,50 @@ default boolean shouldSendAuthenticateMessage()
         {
             return true;
         }
+
+        /**
+         * @return The assumed mode of authentication attempted using this 
negotiator, this will usually be some value
+         * of {@link AuthenticationMode#getDisplayName()} unless an 
implementor provides their own custom authentication
+         * scheme.
+         */
+        default String getAuthenticationMode()
+        {
+            return AuthenticationMode.UNAUTHENTICATED.getDisplayName();
+        }
+    }
+
+    /**
+     * Known modes of authentication supported by Cassandra's provided {@link 
IAuthenticator} implementations.
+     */
+    enum AuthenticationMode
+    {
+        /**
+         * User was not authenticated in any particular way.
+         */
+        UNAUTHENTICATED,
+        /**
+         * User authenticated using a password.
+         */
+        PASSWORD,
+        /**
+         * User authenticated using a trusted identity in their client 
certificate.
+         */
+        MTLS;
+
+        private final String displayName;
+
+        AuthenticationMode()
+        {
+            this.displayName = StringUtils.capitalize(name().toLowerCase());

Review Comment:
   @tolbertam I dont understand ... is not `name()` upper-cased already? It is 
name of that enum ... 



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