Class BasicServerAuthHandler

java.lang.Object
org.apache.arrow.flight.auth.BasicServerAuthHandler
All Implemented Interfaces:
ServerAuthHandler

public class BasicServerAuthHandler extends Object implements ServerAuthHandler
A ServerAuthHandler for username/password authentication.
  • Constructor Details

  • Method Details

    • authenticate

      public boolean authenticate(ServerAuthHandler.ServerAuthSender outgoing, Iterator<byte[]> incoming)
      Description copied from interface: ServerAuthHandler
      Handle the initial handshake with the client.
      Specified by:
      authenticate in interface ServerAuthHandler
      Parameters:
      outgoing - A writer to send messages to the client.
      incoming - An iterator of messages from the client.
      Returns:
      true if client is authenticated, false otherwise.
    • isValid

      public Optional<String> isValid(byte[] token)
      Description copied from interface: ServerAuthHandler
      Validate the client token provided on each call.
      Specified by:
      isValid in interface ServerAuthHandler
      Returns:
      An empty optional if the client is not authenticated; the peer identity otherwise (may be the empty string).