Authentication internals¶
The authentication subsystem lets applications inspect or modify the initialized backend stack before mapper authentication. See the authentication guide for a complete typed example.
AuthFlow¶
AuthMiddlewareManager¶
Bases: MiddlewareManager
Source code in src/pyromax/dispatcher/middlewares/manager.py
14 15 16 17 | |
BaseAuthMiddleware¶
Bases: AbstractMiddleware[AuthFlow[Any, Any, Any], AuthFlow[Any, Any, Any]]
__call__
abstractmethod
async
¶
__call__(
handler: Callable[
[
AuthFlow[Any, Any, Any],
dict[type[Any] | str, Any],
],
Awaitable[Any],
],
event: AuthFlow[Any, Any, Any],
data: dict[type[Any] | str, Any],
) -> Any
Process an event through the base auth middleware.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
handler
|
Callable[[AuthFlow[Any, Any, Any], dict[type[Any] | str, Any]], Awaitable[Any]]
|
Handler to invoke. |
required |
event
|
AuthFlow[Any, Any, Any]
|
Incoming event to process. |
required |
data
|
dict[type[Any] | str, Any]
|
Contextual data passed through the processing pipeline. |
required |
Returns:
| Type | Description |
|---|---|
Any
|
The value returned by the wrapped callable or backend. |
Source code in src/pyromax/auth/middleware.py
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | |