class documentation

class BasicAuth(Auth):

View In Hierarchy

Allows the 'auth' argument to be passed as a (username, password) pair, and uses HTTP Basic authentication.
Method __init__ Undocumented
Method auth​_flow Execute the authentication flow.
Method ​_build​_auth​_header Undocumented
Instance Variable ​_auth​_header Undocumented

Inherited from Auth:

Async Method async​_auth​_flow Execute the authentication flow asynchronously.
Method sync​_auth​_flow Execute the authentication flow synchronously.
Class Variable requires​_request​_body Undocumented
Class Variable requires​_response​_body Undocumented
def __init__(self, username, password):

Undocumented

Parameters
username:typing.Union[str, bytes]Undocumented
password:typing.Union[str, bytes]Undocumented
def auth_flow(self, request):

Execute the authentication flow.

To dispatch a request, yield it:

` yield request `

The client will .send() the response back into the flow generator. You can access it like so:

` response = yield request `

A return (or reaching the end of the generator) will result in the client returning the last response obtained from the server.

You can dispatch as many requests as is necessary.

Parameters
request:RequestUndocumented
Returns
typing.Generator[Request, Response, None]Undocumented
def _build_auth_header(self, username, password):

Undocumented

Parameters
username:typing.Union[str, bytes]Undocumented
password:typing.Union[str, bytes]Undocumented
Returns
strUndocumented
_auth_header =

Undocumented