common_auth.authenticators.base
The shared request-authentication pipeline; schemes only transform prepared requests.
Classes
BaseAuthenticator
Bases: ABC
Prepare, scope-check and apply one scheme through a shared HTTP flow.
Holds immutable configuration only; each flow keeps its own request and challenge budget. Schemes may hold borrowed credential/token collaborators. HTTP owns exchanges and cookies. Authentication owns credential application and explicit challenge recovery; there is no HTTP retry loop here.
__init__
def __init__(config: AuthenticatorConfig) -> NoneFields and properties declared here; inherited members belong to the bases above.
config
config = configapply
async def apply(request: Request, *, prepare: Callable[[Request], Request]) -> AuthResult[Request]Prepare before applying credentials; return the exact request to dispatch.
flow
async def flow(request: Request, *, prepare: Callable[[Request], Request]) -> AsyncGenerator[Request, HttpResponseHead]One flow per operation; only an explicitly recoverable challenge permits replay.
requires_body
@staticmethoddef requires_body(_response: HttpResponseHead) -> boolThese authentication schemes only inspect response challenge headers.