�
K�gs. � �X � d dl mZ d dlZd dlZd dlZd dlZd dlZd dlmZ d dl m
Z
ddlmZ ddl
mZmZmZ ddlmZmZmZ ej rd d lmZ g d
�Z G d� d� � Z G d
� de� � Z G d� de� � Z G d� de� � Z G d� de� � Z G d� dej � � ZdS )� )�annotationsN)� b64encode)�parse_http_list� )�
ProtocolError)�Cookies�Request�Response)�to_bytes�to_str�unquote)�_Hash)�Auth� BasicAuth�
DigestAuth� NetRCAuthc �2 � e Zd ZdZdZdZdd�Zdd�Zd
d
�ZdS )r a�
Base class for all authentication schemes.
To implement a custom authentication scheme, subclass `Auth` and override
the `.auth_flow()` method.
If the authentication scheme does I/O such as disk access or network calls, or uses
synchronization primitives such as locks, you should override `.sync_auth_flow()`
and/or `.async_auth_flow()` instead of `.auth_flow()` to provide specialized
implementations that will be used by `Client` and `AsyncClient` respectively.
F�requestr �return�)typing.Generator[Request, Response, None]c # � K � |V � dS )a
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.
N� ��selfr s �[/home/asafur/pinokio/api/open-webui.git/app/env/lib/python3.11/site-packages/httpx/_auth.py� auth_flowzAuth.auth_flow&