This is an automated email from the ASF dual-hosted git repository.
lidavidm pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow.git
The following commit(s) were added to refs/heads/main by this push:
new 64acef8c5c GH-37722: [Java][FlightRPC] Deprecate stateful login
methods (#37833)
64acef8c5c is described below
commit 64acef8c5ce9731c6c73c5be386535e7af3af5f8
Author: David Li <[email protected]>
AuthorDate: Mon Sep 25 08:45:08 2023 -0400
GH-37722: [Java][FlightRPC] Deprecate stateful login methods (#37833)
### Rationale for this change
The existence of these interfaces confuses users and leads them to
antipatterns.
### What changes are included in this PR?
Deprecate (but not for removal) the old interfaces.
### Are these changes tested?
N/A
### Are there any user-facing changes?
Yes.
* Closes: #37722
Authored-by: David Li <[email protected]>
Signed-off-by: David Li <[email protected]>
---
.../java/org/apache/arrow/flight/auth/ClientAuthHandler.java | 7 +++++++
.../java/org/apache/arrow/flight/auth/ServerAuthHandler.java | 9 +++++++++
2 files changed, 16 insertions(+)
diff --git
a/java/flight/flight-core/src/main/java/org/apache/arrow/flight/auth/ClientAuthHandler.java
b/java/flight/flight-core/src/main/java/org/apache/arrow/flight/auth/ClientAuthHandler.java
index 985e10aa4d..af7da86e00 100644
---
a/java/flight/flight-core/src/main/java/org/apache/arrow/flight/auth/ClientAuthHandler.java
+++
b/java/flight/flight-core/src/main/java/org/apache/arrow/flight/auth/ClientAuthHandler.java
@@ -19,9 +19,16 @@ package org.apache.arrow.flight.auth;
import java.util.Iterator;
+import org.apache.arrow.flight.FlightClient;
+
/**
* Implement authentication for Flight on the client side.
+ *
+ * @deprecated As of 14.0.0. This implements a stateful "login" flow that does
not play well with
+ * distributed or stateless systems. It will not be removed, but should
not be used. Instead
+ * see {@link FlightClient#authenticateBasicToken(String, String)}.
*/
+@Deprecated
public interface ClientAuthHandler {
/**
* Handle the initial handshake with the server.
diff --git
a/java/flight/flight-core/src/main/java/org/apache/arrow/flight/auth/ServerAuthHandler.java
b/java/flight/flight-core/src/main/java/org/apache/arrow/flight/auth/ServerAuthHandler.java
index 3a978b131f..378027c928 100644
---
a/java/flight/flight-core/src/main/java/org/apache/arrow/flight/auth/ServerAuthHandler.java
+++
b/java/flight/flight-core/src/main/java/org/apache/arrow/flight/auth/ServerAuthHandler.java
@@ -20,9 +20,18 @@ package org.apache.arrow.flight.auth;
import java.util.Iterator;
import java.util.Optional;
+import org.apache.arrow.flight.FlightServer;
+import org.apache.arrow.flight.auth2.CallHeaderAuthenticator;
+
/**
* Interface for Server side authentication handlers.
+ *
+ * @deprecated As of 14.0.0. This implements a stateful "login" flow that does
not play well with
+ * distributed or stateless systems. It will not be removed, but should
not be used. Instead,
+ * see {@link
FlightServer.Builder#headerAuthenticator(CallHeaderAuthenticator)}
+ * and {@link CallHeaderAuthenticator}.
*/
+@Deprecated
public interface ServerAuthHandler {
/**