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

Method authenticate

python/pyarrow/tests/test_flight.py:541–548  ·  view source on GitHub ↗
(self, outgoing, incoming)

Source from the content-addressed store, hash-verified

539 self.creds = creds
540
541 def authenticate(self, outgoing, incoming):
542 buf = incoming.read()
543 auth = flight.BasicAuth.deserialize(buf)
544 if auth.username not in self.creds:
545 raise flight.FlightUnauthenticatedError("unknown user")
546 if self.creds[auth.username] != auth.password:
547 raise flight.FlightUnauthenticatedError("wrong password")
548 outgoing.write(tobytes(auth.username))
549
550 def is_valid(self, token):
551 if not token:

Callers

nothing calls this directly

Calls 3

tobytesFunction · 0.85
readMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected