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__(*args, **kwargs)#

Methods

__init__(*args, **kwargs)

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
outgoingServerAuthSender

A channel to send messages to the client.

incomingServerAuthReader

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
tokenbytes

The authentication token from the client.