Skip to content

Commit

Permalink
apacheGH-37722: [Java][FlightRPC] Deprecate stateful login methods (a…
Browse files Browse the repository at this point in the history
…pache#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: apache#37722

Authored-by: David Li <[email protected]>
Signed-off-by: David Li <[email protected]>
  • Loading branch information
lidavidm authored and dgreiss committed Feb 17, 2024
1 parent 39bf473 commit 5408fef
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,16 @@

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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,18 @@
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 {

/**
Expand Down

0 comments on commit 5408fef

Please sign in to comment.