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

Class HttpBasicClientAuthHandler

python/pyarrow/tests/test_flight.py:560–574  ·  view source on GitHub ↗

An example implementation of HTTP basic authentication.

Source from the content-addressed store, hash-verified

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

Callers 2

test_http_basic_authFunction · 0.85

Calls

no outgoing calls

Tested by 2

test_http_basic_authFunction · 0.68