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

Class HttpBasicClientAuthHandler

python/pyarrow/tests/test_flight.py:558–572  ·  view source on GitHub ↗

An example implementation of HTTP basic authentication.

Source from the content-addressed store, hash-verified

556
557
558class HttpBasicClientAuthHandler(ClientAuthHandler):
559 """An example implementation of HTTP basic authentication."""
560
561 def __init__(self, username, password):
562 super().__init__()
563 self.basic_auth = flight.BasicAuth(username, password)
564 self.token = None
565
566 def authenticate(self, outgoing, incoming):
567 auth = self.basic_auth.serialize()
568 outgoing.write(auth)
569 self.token = incoming.read()
570
571 def get_token(self):
572 return self.token
573
574
575class TokenServerAuthHandler(ServerAuthHandler):

Callers 2

test_http_basic_authFunction · 0.85

Calls

no outgoing calls

Tested by 2

test_http_basic_authFunction · 0.68