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

Method authenticate

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

Source from the content-addressed store, hash-verified

582 self.creds = creds
583
584 def authenticate(self, outgoing, incoming):
585 username = incoming.read()
586 password = incoming.read()
587 if username in self.creds and self.creds[username] == password:
588 outgoing.write(base64.b64encode(b'secret:' + username))
589 else:
590 raise flight.FlightUnauthenticatedError(
591 "invalid username/password")
592
593 def is_valid(self, token):
594 token = base64.b64decode(token)

Callers

nothing calls this directly

Calls 2

readMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected