pyarrow.flight.ServerAuthHandler

class pyarrow.flight.ServerAuthHandler

Bases: pyarrow.lib._Weakrefable

Authentication middleware for a server.

To implement an authentication mechanism, subclass this class and override its methods.

__init__()

Initialize self. See help(type(self)) for accurate signature.

Methods

__init__()

Initialize self.

authenticate(self, outgoing, incoming)

Conduct the handshake with the client.

is_valid(self, token)

Validate a client token, returning their identity.

authenticate(self, outgoing, incoming)

Conduct the handshake with the client.

May raise an error if the client cannot authenticate.

Parameters
  • outgoing (ServerAuthSender) – A channel to send messages to the client.

  • incoming (ServerAuthReader) – A channel to read messages from the client.

is_valid(self, token)

Validate a client token, returning their identity.

May return an empty string (if the auth mechanism does not name the peer) or raise an exception (if the token is invalid).

Parameters

token (bytes) – The authentication token from the client.