jerqi commented on code in PR #4160:
URL: https://github.com/apache/gravitino/pull/4160#discussion_r1686127051


##########
server-common/src/main/java/org/apache/gravitino/server/authentication/Authenticator.java:
##########
@@ -55,4 +55,19 @@ default Principal authenticateToken(byte[] tokenData) {
    * @throws RuntimeException if the initialization fails
    */
   void initialize(Config config) throws RuntimeException;
+
+  /**
+   * Determines if the provided token data is supported by this authenticator
+   *
+   * <p>This method checks if the given token data can be processed by this 
authenticator.
+   * Implementations should override this method to provide specific logic for 
determining if the
+   * token data format or content is recognized and can be authenticated.
+   *
+   * @param tokenData The byte array containing the token data to be checked.
+   * @return true if the token data is supported and can be authenticated by 
this authenticator;
+   *     false otherwise.
+   */
+  default boolean supportsAuthentication(byte[] tokenData) {

Review Comment:
   `supportsToken` may be better?



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

Reply via email to