MCPcopy Create free account
hub / github.com/apache/arrow / do_action

Method do_action

python/pyarrow/tests/test_flight.py:722–730  ·  view source on GitHub ↗
(self, context, action)

Source from the content-addressed store, hash-verified

720 """A Flight server that tests with basic token authentication. """
721
722 def do_action(self, context, action):
723 middleware = context.get_middleware("auth")
724 if middleware:
725 auth_header = case_insensitive_header_lookup(
726 middleware.sending_headers(), 'Authorization')
727 values = auth_header.split(' ')
728 return [values[1].encode("utf-8")]
729 raise flight.FlightUnauthenticatedError(
730 'No token auth middleware found.')
731
732
733class ArbitraryHeadersServerMiddlewareFactory(ServerMiddlewareFactory):

Callers

nothing calls this directly

Calls 3

sending_headersMethod · 0.45
encodeMethod · 0.45

Tested by

no test coverage detected