Auth API — Aquilia Documentation
Comprehensive guide and documentation for Auth API in the Aquilia framework. View API reference, examples, and implementation patterns.
HTTP Client / Core API auth.py Outbound authentication interceptors for HTTP requests: Basic, Bearer, API Key, Digest, OAuth2 token refresh, and AWS Signature V4 request signing. 1. Overview auth.py implements authentication as HTTPInterceptor-compatible units. 2. API Reference class AuthInterceptor(HTTPInterceptor, ABC): @abstractmethod def get_auth_header(self, request: HTTPClientRequest) -> tuple[str, str] | None async def intercept( self, request: HTTPClientRequest, next_handler: Callable[[HTTPClientRequest], Awaitable[HTTPClientResponse]], ) -> HTTPClientResponse class BasicAuth(AuthInterceptor): def __init__(self, username: str, password: str) class BearerAuth(AuthInterceptor): def __init__(self, token: str | None = None, token_getter: Callable[[], str] | None = None) class APIKeyAuth(AuthInterceptor): def __init__(self, key: str, header_name: str = "X-API-Key", in_query: bool = False) )
Go to Homepage